Call export in code without show report

Stimulsoft Reports.Silverlight discussion
Locked
hanntd
Posts: 11
Joined: Wed Dec 14, 2011 11:53 pm
Location: hcm

Call export in code without show report

Post 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
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Call export in code without show report

Post by Alex K. »

Hello,

Try to use the following code:

Code: Select all

report.Render();
report.ExportDocument();
Thank you.
hanntd
Posts: 11
Joined: Wed Dec 14, 2011 11:53 pm
Location: hcm

Re: Call export in code without show report

Post by hanntd »

Thanks, I tried that code but it was export to Server, the export file is exported to server instead client machine.
Han
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Call export in code without show report

Post 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
hanntd
Posts: 11
Joined: Wed Dec 14, 2011 11:53 pm
Location: hcm

Re: Call export in code without show report

Post 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
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Call export in code without show report

Post by Alex K. »

Hello,

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