Printing in FastReport

Hi everyone,



I want to print a chart to a FastReport.



Is there a better way to do it than by saving the panes to a bitmap file and then again reading them from the file into a TfrxPictureView inside the Report's OnBeforePrint event? (Which works, but results in a somewhat lo-res print quality.)



I noticed there is a CreateMetafile method in the TAdvGdipChartView, but I get a linker error when I try to use it. Has this method not been implemented yet?



(I am using C++Builder XE3.)



Thanks in advance,

Elmar

Using a bitmap is one way and creating a metafile is also available.
We're not aware of issues with this. What exact linker error do you get?

Bruno,

thanks for your quick reply.

The error I get is:
[ilink32 Error] Error: Nicht auflösbares externes '__fastcall Advchartview::TAdvChartView::CreateMetaFileW(int, int)' referenziert von C:\USERS\BIHLER\DOCUMENTS\RAD STUDIO\PROJECTS\FRTESTS\WIN32\RELEASE\UNIT1.OBJ

which sould translate to something like:
cannot resolve external '__fastcall Advchartview::TAdvChartView::CreateMetaFileW(int, int)' referenced by...

(Note that the linker error says "CreateMetaFileW" regardless of if i write CreateMetaFileW() or CreateMetaFile() in my code.)

Here's my code:

void __fastcall TForm1::frxReport1BeforePrintUsingMetafile(TfrxReportComponent Sender)
{
    if( Sender->Name == "Picture1" ) {
        TfrxPictureView PV = dynamic_cast<TfrxPictureView>(Sender);

        TMetafile
MF = Chart->CreateMetaFile( PV->Width, PV->Height );
        PV->Picture->Assign( MF );
    }
}

where Chart is an TAdvGDIPChartView object on Form1.
My TMS Advanced Charts is the newest version 3.8.1.3.

Regards,
Elmar

Hi, 


We have investigated this here and it seems to be a linked issue in C++Builder, we have implemented a workaround for this. In the next version you will be able to call Chart->CreateMeta(PV->Width, PV->Height); instead.

Kind Regards, 
Pieter

Pieter,



thank you very much for your quick response to this. I am eagerly looking forward to the next version!



Kind Regards,

Elmar