export the Chart

Discussion forum for PivotCube VCL users. Common questions. Bug and problem reports

Moderator: Alex Zencovich

export the Chart

Postby tpau17 » Thu May 21, 2009 6:15 pm

Hi all,

how can I export the chart into the clipboard or into a file like *.jpg instead only print it out with the button ?

thanks for opening the door with a code-key :-)

:-) thomas
tpau17
Guest
 
Posts: 4
Joined: Fri Aug 01, 2008 5:18 pm

Re: export the Chart

Postby AlexZencovich » Fri May 22, 2009 5:21 pm

Next code

var
image : TJPEGImage;
begin
image := TJPegImage.Create;
PivotChart1.SaveToJpegImage(image);
end;

To see how it works, just look at the demo source (procedure TForm1.HTML1Click)
Best regards,

Alex Zencovich
-------------------------------------------------------------------------------------------------------------------------------------------
www.pivotcube.com - OLAP solution for Delphi, C++ Builder and ActiveX environment
AlexZencovich
Site Admin
 
Posts: 580
Joined: Sun Jun 18, 2006 10:09 am

Re: export the Chart

Postby tpau17 » Mon May 25, 2009 4:20 pm

Alex,
thanks for your help,
I have forgotten an important information, sorry: I mean the built-in-form, like in the attachment,

thanks!


:-) thomas
tpau17
Guest
 
Posts: 4
Joined: Fri Aug 01, 2008 5:18 pm

Re: export the Chart

Postby AlexZencovich » Mon May 25, 2009 8:58 pm

Create event for TPivotGrid.OnDDChartCreated.
In event handler add code

PVChartDDForm.Chart1.SaveToJpegImage


(PVChartDDForm defined in PVChartDD_SRC)
Best regards,

Alex Zencovich
-------------------------------------------------------------------------------------------------------------------------------------------
www.pivotcube.com - OLAP solution for Delphi, C++ Builder and ActiveX environment
AlexZencovich
Site Admin
 
Posts: 580
Joined: Sun Jun 18, 2006 10:09 am


Return to PivotCube VCL

Who is online

Users browsing this forum: No registered users and 0 guests

cron