Solved

Is there a better VS Windows Forms Print Preview Control

Posted on 2011-03-04
4
345 Views
Last Modified: 2012-06-27
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
Comment
Question by:batbertram
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 12

Assisted Solution

by:Hairbrush
Hairbrush earned 333 total points
ID: 35035405
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
 

Author Comment

by:batbertram
ID: 35035470
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
 
LVL 10

Accepted Solution

by:
John Claes earned 167 total points
ID: 35035703
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
 
LVL 12

Assisted Solution

by:Hairbrush
Hairbrush earned 333 total points
ID: 35036027
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

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question