Page 1 of 1
Display report directly in PDF
Posted: Sat May 23, 2009 8:42 am
by Rajesh Tanwar
Hi All,
On stimulsoft web viewer, when we click on "Print to PDF" option, report is shown in pdf format.
How I can view report in pdf format without the use of web viewer?
Second, when we click on "Print to PDF", there comes a dialog asking whether to "Open" file, "Save" file or "Cancel". When viewing report programatically, I want that dialog should not appear. Instead report should open directly in pdf. How I can achieve this?
Display report directly in PDF
Posted: Mon May 25, 2009 12:56 am
by Jan
Hello,
On stimulsoft web viewer, when we click on "Print to PDF" option, report is shown in pdf format.
How I can view report in pdf format without the use of web viewer?
You can use following code in PageLoad event of web page:
Code: Select all
Stimulsoft.Report.Web.StiReportResponse.ResponseAsPdf(this, report);
Second, when we click on "Print to PDF", there comes a dialog asking whether to "Open" file, "Save" file or "Cancel". When viewing report programatically, I want that dialog should not appear. Instead report should open directly in pdf. How I can achieve this?
You can use two variants:
Code: Select all
Stimulsoft.Report.Web.StiReportResponse.ResponseAsPdf(this, report, true);
//With dialog box
Code: Select all
Stimulsoft.Report.Web.StiReportResponse.ResponseAsPdf(this, report, false);
//Without dialog box
Thank you.
Display report directly in PDF
Posted: Mon May 25, 2009 5:05 am
by Rajesh Tanwar
Hi Jan,
thanks for the support.
My first problem is solved.
For the second problem, I want to display report on new page, but don't want to display the dialog (having option of "Open","Save" and "Cancel").
If I use following code...
Code: Select all
Stimulsoft.Report.Web.StiReportResponse.ResponseAsPdf(this, report, false);
then report is shown on the current page. But I want to show it on new page.
Thanks,
Rajesh Tanwar
Display report directly in PDF
Posted: Tue May 26, 2009 12:47 am
by Vladimir
Hello,
See the sample in attached archive.
Thank you.
Display report directly in PDF
Posted: Thu May 28, 2009 4:07 am
by Rajesh Tanwar
Hi Vladimir,
Thanks for the sample.
My second problem is also solved.:biggrin:
Regards,
Rajesh Tanwar
Re: Display report directly in PDF
Posted: Wed Sep 27, 2017 7:09 pm
by gabrielw3n
Hi..
How can I do it using JS?
Re: Display report directly in PDF
Posted: Thu Sep 28, 2017 12:54 pm
by Alex K.
Hello,
Please check the sample at the following link:
https://www.stimulsoft.com/en/samples/j ... ort-to-pdf
Thank you.