Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Save Report to PDF format Programmatically

Status
Not open for further replies.

gundie

Programmer
Feb 5, 2004
69
US
I've created a report (not CR) in VB.net, and I'm able to view the report using a report viewer, however, I want to be able to export this report as a PDF file. How do I do that?
 
The way i've done it is to install a pdf converter like pdf995 (which looks like a printer) and it up to run in 'quiet' mode (no dialogs to screen) then programmatically save the default printer, change the default printer to the pdf995 one, print then change the default printer back.

In my case all done via a webbrowser object - dont know how you would do it in report view - the major problem being if you want to use the created file straight away (eg emailing or such) you have to wait for the conversion to finish which runs in the background
see (go to the bottom for the solution)

Hope it helps - will post the changing printer code if you need it
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top