Page 1 of 1

Export to PDF

Posted: Mon Mar 03, 2014 12:07 pm
by aline
Hi!

How can I have a button in the viewer that sends user directly to Export to PDF options ?

Thank you,

Aline

Re: Export to PDF

Posted: Tue Mar 04, 2014 9:06 am
by Alex K.
Hello,

Sorry, maybe we did not exactly understand your question. Could you explain your issue in more details?

Thank you.

Re: Export to PDF

Posted: Tue Mar 04, 2014 9:11 am
by Alex K.
Hello,

As a way, you can create a export to Pdf class and call method ExportPdfAsync() with necessary for you parameters
var pdfService = new StiPdfExportService();
await this.ExportPdfAsync(.....)

Thank you.

Re: Export to PDF

Posted: Tue Mar 04, 2014 11:07 am
by aline
Hi!

I'll try to explain better my question:

When exporting the report to PDF by code, user doesn't get to choose export options as when using the export button on the viewer's toolbar.

Using the export button on the viewer toolbar, user has to choose first PDF and then pdf export options.
What I would like is a button in the toolbar viewer so user goes straight to PDF options. Something like "export to PDF".

Thanks

Aline

Re: Export to PDF

Posted: Wed Mar 05, 2014 1:53 pm
by HighAley
Hello.

You could add your own button for exporting to PDF directly.

Thank you.

Re: Export to PDF

Posted: Wed Mar 05, 2014 4:09 pm
by aline
Hello!

I know how to add a custom buttom to the toolbar. The question is that when I do this, I use the following code

Code: Select all

exportPDFService.ExportPdfAsync(reportViewer.Report, storageFilePDF, new StiPdfExportSettings());
to export the report. But this way user doesn't get to choose export options like when using your button...Is there a way to do this?

Thanks

Aline

Re: Export to PDF

Posted: Mon Mar 10, 2014 5:32 am
by HighAley
Hello.

Sorry for the delay with answer we needed some time for analyzing of your issue.
It's impossible to call export options window from your button.
But you could use our code and create your own.
StiPdfExportSetupPage.zip
(3 KiB) Downloaded 573 times
Thank you.

Re: Export to PDF

Posted: Tue Mar 11, 2014 2:26 pm
by aline
Hello!

Thank you for sharing your code!

I've implemented the export options !

Aline Almeida

Re: Export to PDF

Posted: Wed Mar 12, 2014 3:57 am
by Andrew
Hello,

Excellent. We are always glad to help you!