Printing Chart on WPF

Found a possible bug in LightningChart? Report it here.

Moderator: Queue Moderators

Post Reply
DomeB
Posts: 2
Joined: Thu Jun 06, 2013 7:10 am

Printing Chart on WPF

Post by DomeB » Thu Jun 06, 2013 7:42 am

I want to print the Chart with the function 'PrintPreview'. When i call the function, an Exception accured: D3DERR_INVALIDCALL: Invalid call (-2005530516)

Code: Select all

  bei SlimDX.Result.Throw[T](Object dataKey, Object dataValue)
   bei SlimDX.Result.Record[T](Int32 hr, Boolean failed, Object dataKey, Object dataValue)
   bei SlimDX.Direct3D9.Device.GetRenderTargetData(Surface renderTarget, Surface destinationSurface)
   bei A.UF.LI(BitmapAntialiasOptions A)
   bei A.KG.SB()
   bei A.QB.QB()
   bei Arction.WPF.LightningChartUltimate.LightningChartUltimate.YT()
   bei A.KG.RB(Object A, PrintPageEventArgs B)
   bei System.Drawing.Printing.PrintDocument.OnPrintPage(PrintPageEventArgs e)
   bei System.Drawing.Printing.PrintDocument._OnPrintPage(PrintPageEventArgs e)
   bei System.Drawing.Printing.PrintController.PrintLoop(PrintDocument document)
   bei System.Drawing.Printing.PrintController.Print(PrintDocument document)
   bei System.Drawing.Printing.PrintDocument.Print()
   bei System.Windows.Forms.PrintPreviewControl.ComputePreview()
   bei System.Windows.Forms.PrintPreviewControl.CalculatePageInfo()
When i use the function Print() without parameters, the chart background is changing from black to white but nothing else happens.
When i use the function Print() with parameters, the chart background remains dark and the printing is successful.
When i use the function PrintWithPrinterSelection(), the printer selection Dialog is displayed. But when i clicked on 'print' the chart background is changing from black to white but nothing else happens.
When i use the function PrintWithPageSetup(true,true), the page setup Dialog is displayed. But when i clicked on 'ok' the chart background is changing from black to white but nothing else happens.

What's wrong? I only start the program und call the function.
On WinForms everything is fine.

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: Printing Chart on WPF

Post by ArctionPasi » Thu Jun 06, 2013 3:31 pm

Please tell the version of the LightningChart you are using.

I just tested with latest 5.1.5 version with WPF demo application and the printing worked OK, by pressing the Print... button in the lower left corner. Can you verify does it work for you?
LightningChart Support Team, PT

DomeB
Posts: 2
Joined: Thu Jun 06, 2013 7:10 am

Re: Printing Chart on WPF

Post by DomeB » Mon Jun 10, 2013 11:03 am

Hi,

I installed the 5.1.5 and i think it is ok now.
Thanks for your help.

Post Reply