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.
0
votes
1 Answers
1
votes
Try this solution :
Remove the
TfrxRTFExport
component from your DataModule.Declare your
TfrxRTFExport
variable.On
frxReport1Preview
event , create yourTfrxRTFExport
.On
frxReport1ClosePreview
event ,Free
yourTfrxRTFExport
.
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.
Preview
andClosePreview
events. – Ilyes