Tracer
Tracer

Reputation: 2736

How can I disable existing FastReport export?

I'm using C++ Builder XE7 & FastReport components. My form contains two reports (TfrxReport components) and two export components (TfrxRTFExport, TfrxPDFExport). If I preview any of those two reports I have the option to export to RTF and PDF. But, I would like to disable RTF export for the second report while still having that option for the first report. How to do it? Thanks.

Upvotes: 0

Views: 1505

Answers (1)

Ilyes
Ilyes

Reputation: 14928

Try this solution :

  • Remove the TfrxRTFExport component from your DataModule.

  • Declare your TfrxRTFExport variable.

  • On frxReport1Preview event , create your TfrxRTFExport.

  • On frxReport1ClosePreview event , Free your TfrxRTFExport.

Another solution :

If you have two button (Button 1 for the report2 , Button2 for the report1) then :

In Button 1 :

  • Free your TfrxRTFExport then show the report

In Button 2 :

  • Create your TfrxRTFExport , then show the report.

Upvotes: 1

Related Questions