Page 1 of 1

Call export in code without show report

Posted: Wed Sep 05, 2012 3:21 pm
by hanntd
Hi,
Can we call export report to Excel without print preview to show (rending) report? Because our report have a lot of data (the time to query data not show long) I debug in code and saw that the system is hang when report is rending to show on screen. So I'd like to export directly to excel without view and show on screen.
Thanks
Han

Re: Call export in code without show report

Posted: Thu Sep 06, 2012 7:33 am
by Alex K.
Hello,

Try to use the following code:

Code: Select all

report.Render();
report.ExportDocument();
Thank you.

Re: Call export in code without show report

Posted: Sat Sep 08, 2012 3:18 pm
by hanntd
Thanks, I tried that code but it was export to Server, the export file is exported to server instead client machine.
Han

Re: Call export in code without show report

Posted: Mon Sep 10, 2012 7:34 am
by HighAley
Hello.
hanntd wrote:Thanks, I tried that code but it was export to Server, the export file is exported to server instead client machine.
Unfortunately, due to Silverlight restrictions it's impossible to access to file system without dialog window.

Thank you

Re: Call export in code without show report

Posted: Tue Sep 11, 2012 4:32 pm
by hanntd
I have a solution for my issue, first I export to server and then download to client by using stream downloading.
Thanks for your help
Han

Re: Call export in code without show report

Posted: Wed Sep 12, 2012 7:06 am
by Alex K.
Hello,

Ok.
Let us know if you need any additional help.