This is a migrated thread and some comments may be shown as answers.

Print Preview not Refreshing.

2 Answers 100 Views
Chart (obsolete as of Q1 2013)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Thomas Seest
Top achievements
Rank 1
Thomas Seest asked on 22 Jan 2008, 03:18 PM
I'm using the demo version of the Chart for WinForms component with VS 2005 using Visual Basic.  We're considering purchasing the ASP.NET and Winform component sets.

I have everything working in my test application with the exception of one small problem.

I use the following code to display a print preview of my chart:

Me.SalesUnitChart.Printing.PrintDocument.DefaultPageSettings.Landscape = True

Me.SalesUnitChart.Printing.PrintChart(Telerik.WinControls.UI.ChartPrintOptions.ShowPrintPreviewDialog)

Me.SalesUnitChart.Printing.PrintDocument.Dispose()

Me.SalesUnitChart.Printing.Dispose()

This code works fine.  However, if the user regenerates the chart with different data, it allways displays the 1st rendering of the chart, even if the datasource for the chart has changed.  The chart appears correct on the screen, but the view in Print Preview is allways the first chart.

Is there a method that I need to call to clear the first rendered graphic, and get a new one?

Thanks.

2 Answers, 1 is accepted

Sort by
0
Konstantin Petkov
Telerik team
answered on 25 Jan 2008, 07:31 AM
Hello Thomas,

Unfortunately this appears to be a problem at present. We have logged it into our bug-tracker and will look into resolve it as soon as possible.

I have updated your Telerik points as a small token of gratitude for pointing this out to us. Please, excuse us for the temporary inconvenience.

Greetings,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Thomas Seest
Top achievements
Rank 1
answered on 25 Jan 2008, 05:07 PM
Thank you for your reply.  I figured it was a bug, but couldn't be sure.

In the mean time, I've replaced this code with the following lines, which work well enough for my users:

Me.SalesUnitChart.Save("C:\SalesChart.jpg", System.Drawing.Imaging.ImageFormat.Jpeg)

Process.Start("C:\SalesChart.jpg")

This just uses the defalt application for image handling in windows, and retrieves the image.  From their, they can print the chart.

Thanks again.

Tom Seest

Tags
Chart (obsolete as of Q1 2013)
Asked by
Thomas Seest
Top achievements
Rank 1
Answers by
Konstantin Petkov
Telerik team
Thomas Seest
Top achievements
Rank 1
Share this question
or