Is this the bug of Fastreport in saving file
The component on my form.
Table1, DataSource1
frReport1, frRTFExport1, frDBDataSet1
RadioButton1, RadioButton2, RadioButton3
Button1
When I select the report through radiobutton, it show report in order 001, 002, and 003
The Problem is... when I preview report 001.frf then save to rtf file.. then close the preview window. and select another report to show. but it always show report 001.frf. What happen. I use the fastreport version 2.52
Table1, DataSource1
frReport1, frRTFExport1, frDBDataSet1
RadioButton1, RadioButton2, RadioButton3
Button1
if radiobutton1.Checked then frreport1.LoadFromFile('001.frf') else
if radiobutton2.Checked then frreport1.LoadFromFile('002.frf') else
if radiobutton3.Checked then frreport1.LoadFromFile('003.frf');
frreport1.ShowReport;
When I select the report through radiobutton, it show report in order 001, 002, and 003
The Problem is... when I preview report 001.frf then save to rtf file.. then close the preview window. and select another report to show. but it always show report 001.frf. What happen. I use the fastreport version 2.52
Comments
if you are trying to give an choice of which report to run
try using a radio group then in preview button
use a case statement to get the radio groups index and then
when loading and runnig reports call report components clear method
before calling loadfromfile method
ie onclick of preview button
begin
frreport1.clear; // obvious
case radiogroup1.itemindex of
0:
begin
set props of report components or other items here
frreport1.loadfromfile('001.frf)
end;
1:
begin
set props of report components or other items here
frreport1.loadfromfile('002.frf)
end
2:
begin
set props of report components or other items here
frreport1.loadfromfile('003.frf)
end;
end; // end of case
frreport1.showreport; // or whatever other method you want
end;
regards