Since TeeSaveToPDFFile is not valid with Delphi 2009 (and TeeChart Pro 8.04), I try to export my graphs from QuickReport 5 with Gnostice Technologies...
I have installed QRChart (which is a little hard)! After that, I have created a form containing a QuickRep component and a QRChart. Her is my code:
Code: Select all
procedure TForm1.SpeedButtonPDFClick(Sender: TObject);
begin
if SaveDialog1.Execute
then
begin
// TeeSaveToPDFFile(Chart1, SaveDialog1.FileName, Chart1.Width, Chart1.Height);
Screen.Cursor := crHourGlass;
Form2 := TForm2.Create(nil);
try
Form2.QRChart1.SetChart(Chart1);
// Form2.QuickRep1.PreviewModal;
Form2.gtPDFEngine1.FileName := SaveDialog1.FileName;
Form2.gtQRExportInterface1.RenderDocument(Form2.QuickRep1, False);
finally
Form2.Release;
Screen.Cursor := crDefault;
end;
end;
end;
The values are inserted with the AddPie method and only AValue and ALabel parameters (not AColor in order to use the default color).
Graphs with 1 or 2 values are ok, but another with 9 values is not correctly copied: colors became (yellow, blue, white, gray, ...) instead of (red, green, yellow, blue, ...)!
This issue is not coming from the PDF export because it occurs also in a preview of the report!
Is it a bug?
--
Alain