• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 372
  • Last Modified:

Is there a better VS Windows Forms Print Preview Control

We have an application developed in C++.NET 2003.

All of its reports generate to the standard windows forms PrintPreview control.

Our customers are always asking if they can export these to PDF or Excel and we keep having to say no because there are over 100 reports and we don't have the time to build the functionality everywhere.

Is there a different, custom, control out there that works largely in the same way as the standard print preview control but can export the data?
0
batbertram
Asked:
batbertram
  • 2
3 Solutions
 
HairbrushCommented:
Hi there

Have you thought about providing your client with a printer driver that prints to PDF?  There are many such drivers available.  I've used http://www.verypdf.com/pdfcamp/pdfcamp.htm but googling for "PDF printer driver" will reveal many alternatives, including probably better ones than VeryPDF.

Is the existing preview control that you're using this one? System.Windows.Forms.PrintPreviewControl
or this one? System.Windows.Forms.PrintPreviewDialog
0
 
batbertramAuthor Commented:
We do that in some places as a workaround to solve the PDF problem but it doesn't help us with Excel or CSV.

We are using the PrintPreviewDIalog if that helps.

We'd even consider upgrading our project to VS 2010 if there was a solution available.
0
 
John ClaesCommented:
Hey,

PDF
I'm using cute Pdf.  (http://www.cutepdf.com/)
this is a Pdf printer, everything you print upon it will become a Nice PDF- and you can choose where to save.

Excel
That is something that isn't that simple.
You have to retreive the Query that was executed and then export the RecordSet as a Csv.

regards

poor beggag
0
 
HairbrushCommented:
Hmm I am struggling to think of an easy way to achieve the "Export to Excel" functionality.  If you could stomach converting your 100 reports into RDL format then you could use Microsoft's excellent report viewer (http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a941c6b2-64dd-4d03-9ca7-4017a0d164fd&displaylang=en) amply described here:  http://www.gotreportviewer.com/
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now