Skip to Content
0

How to export to Application without Saving to Disk

Feb 02, 2017 at 06:04 AM

101

avatar image

Hi,

We've recently converted from using the activeX Crystal Runtime to .net runtime 13.0.18 and I'm trying to figure out how I can export a crystal report to another format such as PDF/Excel/etc and opening it up in the default program without saving it to disk.

In the activeX runtime, we simply had

report.ExportOptions.DestinationType = {&crEDTApplication}.

report.Export(false).

Where {&crEDTApplication} is globally defined as the enumerator for exporting to Application (in this case it's simply integer 5).

How do I do this in .net programming? I can't see any ExportDestinationType enums for Exporting to application in https://technet.microsoft.com/en-us/library/security/ms226377(v=vs.80).aspx

Thanks!

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Don Williams
Mar 16, 2017 at 04:51 PM
0

Hi Xin,

See this example on how to enable exporting to destination application:

https://support.wdf.sap.corp/sap/support/notes/0001765153

It works great...

Don

Share
10 |10000 characters needed characters left characters exceeded
Janos Nagy
Feb 02, 2017 at 04:36 PM
0

Hello

You may export it into a temp folder, than open the application from the temoorary space. When the application closes, do a cleanup.

You can do it in a thread, which handles the export, opens the application and do the cleanup.

Regards,

János

Share
10 |10000 characters needed characters left characters exceeded
Xin Jiang Feb 03, 2017 at 03:09 AM
0

Thanks for your reply, János. That's what we're currently doing but I find it much slower than in the past when we used the ActiveX control and was able to export straight to application.

Is there no way to do this at all? We currently use Report.ExportToDisk, but I can see the ExportToStream method, would that work?

Share
10 |10000 characters needed characters left characters exceeded