Page 1 of 1

Send Report in Pdf to front end from .NET

Posted: Fri Aug 18, 2023 2:59 pm
by alanguevara
Hi there,

Is is possible to send back to the viewer a report in PDF format? I want to give user an option to send pdf to one of our services without having to click export or save in the viewer?

I see we can do:

Code: Select all

report.ExportDocument(StiExportFormat.Pdf, "path");
But instead of storing it in a folder I want to be able to store it in a variable and then either send it to the front end or have a method in the backend that can upload that pdf somewhere else.

Thanks,

Re: Send Report in Pdf to front end from .NET

Posted: Fri Aug 18, 2023 4:01 pm
by Lech Kulikowski
Hello,

It is not possible to open PDF in the viewer. But you can export the report to PDF in your code and then open it where you need.

Thank you.

Re: Send Report in Pdf to front end from .NET

Posted: Tue Aug 22, 2023 3:56 pm
by alanguevara
Thanks Lech for your quick response. I want to export the report to PDF with code and then and save the PDF file in a variable? I want to later upload that pdf file to different service.

Thanks,

Re: Send Report in Pdf to front end from .NET

Posted: Wed Aug 23, 2023 10:36 pm
by Lech Kulikowski
Hello,

You can use ExportDocument method and save PDF in the necessary object.

Thank you.

Re: Send Report in Pdf to front end from .NET

Posted: Thu Aug 24, 2023 1:39 pm
by alanguevara
Can you share an example on how to do it? Based on the ExportDocument method and examples I can only see how to store it in the path pass as argument.

Re: Send Report in Pdf to front end from .NET

Posted: Sat Aug 26, 2023 5:31 pm
by Lech Kulikowski
Hello,

You can use Stream in the ExportDocument method.

Thank you.