Generating one report on server side and parse to pdf/html

Stimulsoft Reports.NET discussion
Post Reply
MichalCh
Posts: 17
Joined: Fri Sep 22, 2017 7:37 am

Generating one report on server side and parse to pdf/html

Post by MichalCh »

Hello,

I wanted to ask if there is a way to generate firstly a report (which takes long to generate) and then just parse it to different formats such as html/pdf/excel etc? (On the server side only)
The idea is to not regenerate same report each time the user request just another type for the same exact report. I've managed to extract from node services a report in json format (so it can be kept in cache/file) but I've no idea how can I parse it then to another types (probably through node services as well somehow).

Can it be done and could you be of any help?

Cheers
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Re: Generating one report on server side and parse to pdf/ht

Post by Edward »

Hi Michal,

Yes, that is possible. The idea here is that the report can be rendered without output of its result anywhere firstly by calling the following method:

Code: Select all

report.Render(false); 
and then the report object can be used to output to different formats, exactly this is done from the preview screen.

https://www.stimulsoft.com/en/documenta ... m_code.htm

And there is one more a bit more complex example to illustrate the technique:
https://www.stimulsoft.com/en/samples/w ... e-pdf-file

Thank you,
Edward
tayar
Posts: 30
Joined: Tue Sep 26, 2017 9:22 am

Re: Generating one report on server side and parse to pdf/ht

Post by tayar »

Hi,

Just to clarify, the question is about the version .NET Core
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Generating one report on server side and parse to pdf/ht

Post by Alex K. »

Hello,

You can find samples at the following link:
https://github.com/stimulsoft/Samples-NET.Core-CSharp

Thank you.
MichalCh
Posts: 17
Joined: Fri Sep 22, 2017 7:37 am

Re: Generating one report on server side and parse to pdf/ht

Post by MichalCh »

Hello,

Thank you for your replies. As tayar said the question is about .NET Core. Aleksey, I've downloaded and studied the samples provided but unfortunately I wasn't able to find a solution for a problem described in the first post. The solutions were regenerating same report each time (and that's not what we want). As I said I've seen I can extract the report in a JSON format but later on I'd need another node service to either report.renderAsync using StiPDFExport or StiHtmlExport Settings/Services but unfortunately I couldn't make it happen and that's why I'm here asking for guidance.

Cheers
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Generating one report on server side and parse to pdf/ht

Post by Alex K. »

Hello,

After first rendering report, you can save it as the rendered document. And then you can load and export this document without a rendering.

Thank you.
Post Reply