Exporting an updated image exports the orginal image in FR5 - C++ Builder
                    I want to change  the bitmap or canvas in a FR form before I export it.  I am trying to update an image (normaly it will be png or jpg)  and want to exprot the final result as a PDF.  This code below works well but it always exports the PDF with original picture of the Report while I can see the loaded picture in the Picture1 on the preview.
Also Preview export do same as below. What should I have to do to export PDF with an updated image ?
frxPreview1->Lock();
frxPreview1->Export(frxPDFExport1);
frxPreview1->Unlock();
                            void __fastcall TForm1::UPDATEClick(TObject *Sender)
{
	TfrxPictureView *picv;
	TfrxComponent   *PV;
	Image1->Picture->LoadFromFile("ship.bmp");
	PV  = frxReport1->FindObject("Picture1");
	if(PV)
	{
		picv = new TfrxPictureView(PV);
		picv->Center = true;
		picv->Width = Image1->Picture->Width;
		picv->Height = Image1->Picture->Height;
		picv->Picture->Assign(Image1->Picture);
	}
	if( frxReport1->PrepareReport(true) )
	{
		frxPDFExport1->FileName="testx.pdf";
		frxPDFExport1->ShowDialog = false;
	        frxReport1->Export(frxPDFExport1);
	}
}
Also Preview export do same as below. What should I have to do to export PDF with an updated image ?
frxPreview1->Lock();
frxPreview1->Export(frxPDFExport1);
frxPreview1->Unlock();
Comments