Welcome Guest Search | Active Topics | Sign In | Register

Callback Panel Error Options
Markus Geiger
Posted: Monday, September 8, 2008 11:15:36 AM
Rank: Newbie
Groups: Member

Joined: 9/4/2008
Posts: 0
Hi,

I have another problem. I building a reporting solution that has a Crystal Report Viewer inside a call back panel. Everything works fine except for the print or export button on the report viewer. I get this weird error. For refernce sake, I pasted it below. The part in red is where the problem occurs. Any suggestions?

Code: JavaScript
_eo_guardDocWrite=true;
[color=red]print = true[/color];crystal_postback="<input type='hidden' name='__EVENTTARGET' value='CrystalReportViewer1'><input type='hidden' name='__EVENTARGUMENT' value='export'><input type='hidden' name='eo_cb_id' value='CallbackPanel1'><input type='hidden' name='eo_cb_trigger' value='CrystalReportViewer1'><input type='hidden' name='eo_cb_param' value=''><input type='hidden' name='__eo_obj_states' value='ASEBHhBSZXBvcnRDb250YWluZXIhAgUEMDowfAUEMTowfA=='><input type='hidden' name='__eo_sc' value=''><input type='hidden' name='TreeView1_ExpandState' value='een'><input type='hidden' name='TreeView1_SelectedNode' value=''><input type='hidden' name='TreeView1_PopulateLog' value=''><input type='hidden' name='__LASTFOCUS' value=''><input type='hidden' name='__VIEWSTATE' value='/wEPDwUKLTcyMjkxMzE3OA9kFgICAw9kFgICAQ9lFgRmD2QWAgIBDzwrAAkCAA8WBh4NTmV2ZXJFeHBhbmRlZGQeDFNlbGVjdGVkTm9kZWQeCUxhc3RJbmRleAIDZAgUKwACZBQrAAIWAh4IRXhwYW5kZWRnFCsAAmQUKwACFgIfA2dkZAIBD2QWAgIBDw9kD2QFQEJ3TXJlME52Ym5SeWIyeEpSRHBEY25semRHRnNVbVZ3YjNKMFZtbGxkMlZ5TVR0UVlYSmhiV1YwWlhJNmZRQUEWAgIBDxcDBQRCQVNFZAUDY3NzZQUPUmVwb3J0Vmlld1N0YXRlFwYFCkRlc2lnbk1vZGVoBRJQYWdlUmVxdWVzdENvbnRleHQXAwUKUGFnZU51bWJlcgIBBRVJc0xhc3RQYWdlTnVtYmVyS25vd25nBQ5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CYWNrS2V5X18WDAUJVHJlZVZpZXcxBSBDcnlzdGFsUmVwb3J0Vmlld2VyMSRjdGwwMiRjdGwwMAUgQ3J5c3RhbFJlcG9ydFZpZXdlcjEkY3RsMDIkY3RsMDEFIENyeXN0YWxSZXBvcnRWaWV3ZXIxJGN0bDAyJGN0bDAyBSBDcnlzdGFsUmVwb3J0Vmlld2VyMSRjdGwwMiRjdGwwMwUgQ3J5c3RhbFJlcG9ydFZpZXdlcjEkY3RsMDIkY3RsMDQFIENyeXN0YWxSZXBvcnRWaWV3ZXIxJGN0bDAyJGN0bDA1BSBDcnlzdGFsUmVwb3J0Vmlld2VyMSRjdGwwMiRjdGwwNgUgQ3J5c3RhbFJlcG9ydFZpZXdlcjEkY3RsMDIkY3RsMDcFIENyeXN0YWxSZXBvcnRWaWV3ZXIxJGN0bDAyJGN0bDEwBSBDcnlzdGFsUmVwb3J0Vmlld2VyMSRjdGwwMiRjdGwxMgUgQ3J5c3RhbFJlcG9ydFZpZXdlcjEkY3RsMDIkY3RsMTTAbL8RTUfRzMcvKJcQ9FXFNROwUA=='><input type='hidden' name='eo_version' value='6.0.32.2'><input type='hidden' name='CrystalReportViewer1$ctl02$ctl09' value=''><input type='hidden' name='CrystalReportViewer1$ctl02$ctl11' value='AAEAAAD/////AQAAAAAAAAAEAQAAABxTeXN0ZW0uQ29sbGVjdGlvbnMuSGFzaHRhYmxlBwAAAApMb2FkRmFjdG9yB1ZlcnNpb24IQ29tcGFyZXIQSGFzaENvZGVQcm92aWRlcghIYXNoU2l6ZQRLZXlzBlZhbHVlcwAAAwMABQULCBxTeXN0ZW0uQ29sbGVjdGlvbnMuSUNvbXBhcmVyJFN5c3RlbS5Db2xsZWN0aW9ucy5JSGFzaENvZGVQcm92aWRlcgjsUTg/AwAAAAoKCwAAAAkCAAAACQMAAAAQAgAAAAMAAAAGBAAAAA5MYXN0UGFnZU51bWJlcgYFAAAAFUlzTGFzdFBhZ2VOdW1iZXJLbm93bgYGAAAAClBhZ2VOdW1iZXIQAwAAAAMAAAAICAEAAAAIAQEICAEAAAAL'><input type='hidden' name='CrystalReportViewer1$ctl02$ctl13' value=''><input type='hidden' name='CrystalReportViewer1$ctl02$ctl15' value='100'><input type='hidden' name='__EVENTVALIDATION' value='/wEWGgLEvrm/BwLp4onaDgLp4p21BwLp4uGjDQLp4vX+BQLp4rntCwLp4s3IBALp4pG3CgLp4qWSAwLp4v3bAQLO+evEBALO+f+fDQLn14mmDQLO+cOOAwLO+dfpCwLO+ZvYAQLO+a+zCgLAlvneBgLFlsXeBgLHlvneBgLn16KJAQL+xbWXBALn19aKAQLm16KJAQLp16KJAQLo16KJAclO8SnXgGTrwgbRAVQiC/ovuqq5'><input type='hidden' name='CrystalReportViewer1_ctl02_ctl01.x' value='5'><input type='hidden' name='CrystalReportViewer1_ctl02_ctl01.y' value='14'>";
rpt=true;
pdf=true;
word=true;
xls=true;
;recXls=true;
;rtf=true;
window.open("/aspnet_client/System_Web/2_0_50727/CrystalReportWebFormViewer3/html/crystalexportdialog.htm", "", "dependent,height=450,resizable,width=600");
eo_support
Posted: Monday, September 8, 2008 11:29:32 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,193
Hi,

I am not exactly sure what's causing the problem. However JavaScript rendered inside CallbackPanel runs in a local scope instead of global scope, so that may cause some problem for you. In another word:

Code: JavaScript
print=true;


is not visible on the global scope. So when some other code in the global scope attempts to check the value of variable "print", it won't see anything.

I believe if you define the variable globally first before the callback, the code will effectively modified the global version, otherwise it will create its own local version and go out of scope as soon as the script block finishes. Thus that could be a workaround for you.

You may also want to take a look of ASP.NET UpdatePanel. They work in a very similar way but they appear to run the JavaScript in global scope. It's only available for ASP.NET 2.0 and above, though.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.