PDF Exporting a Composite Report results in an AV
i've built a composite report aproximately like this.
exporting the preview like this does not cause any problems:
The Problem does only occur on Windows XP.
Couriously i get no exception when first srolling to the last page in the preview and exporting afterwards.
Any hint or help on this highly appreciated
frxReport.LoadFromFile(ExtractFilePath(Application.ExeName) + REPORT_DIRECTORY + 'report1.fr3');
frxReport.PrepareReport;
frxReport.LoadFromFile(ExtractFilePath(Application.ExeName) + REPORT_DIRECTORY + 'report2.fr3');
frxReport.PrepareReport(false);
exporting the preview like this does not cause any problems:
frxPDFExport.ShowDialog := true;
frxPDFExport.Background := true;
frxPreview.Export(frxPDFExport);
but trying to export the composite report in background with the options dialog disabled results in an Access Violation.The Problem does only occur on Windows XP.
Couriously i get no exception when first srolling to the last page in the preview and exporting afterwards.
Any hint or help on this highly appreciated
Comments
what version level and build no are you using.
if you are exporting in the background you would not be scrolling in the report preview.
i would expect you have missed setting a property of the export filter.
what i ment was if i first scroll to the buttom of the report i can export it afterwards without any problem-
what kind of property could i've missed. currently i'm setting:
i've allready tried other way to do the export resulting in the same prob:
or
THX!
frxPreview.Export(frxPDFExport);
here is a typical example
procedure TForm1.Button5Click(Sender: TObject);
begin
frxreport5.LoadFromFile('mypo.fr3');
frxreport5.PrepareReport;
frxreport5.LoadFromFile('myotherpo.fr3');
frxreport5.PrepareReport(false);
frxpdfexport1.OpenAfterExport:= true;
frxpdfexport1.ShowDialog := false;
frxpdfexport1.FileName:= 'mypo.pdf';
frxreport5.Export(frxpdfexport1);
end;