views:

1356

answers:

1

Hey Everyone,

Any info out there on how to print the generated charts in say PDF format? They look fabulous on screen but the end users want to print them and file as needed.

A: 

download the Chart Control samples from MSDN. there are several samples of how to print. To get PDF, you need a PDF print driver.

http://code.msdn.microsoft.com/mschart/Release/ProjectReleases.aspx?ReleaseId=1591

look in \WinSamples\ChartFeatures\Printing\

the simple way is:

using System.Windows.Forms.DataVisualization.Charting;
...

// Show Page Setup dialog
chart1.Printing.PageSetup();

// Print preview chart
chart1.Printing.PrintPreview();

// Print chart (without Printer dialog)
chart1.Printing.Print(false);

...
dmh2000
I don't understand why this answer was marked as correct. The question is about printing the MS Chart in ASP.NET, whereas the answer is about printing it in WinForms.And, in the ASP.NET Chart Samples, there are no Printing examples.
Dan Dumitru