Report from multiselect DBGrid
I have a multiselect DBGrid that contain MasterData.
Some table / dataset is detail for MasterData.
I want user can print only selected row.
This is working like "Chosing record to Print" on demo program. But not use internal form FastReport.
Can fastreport handle this?
Some table / dataset is detail for MasterData.
I want user can print only selected row.
This is working like "Chosing record to Print" on demo program. But not use internal form FastReport.
Can fastreport handle this?
Comments
set the properties of the frxdbdataset before calling report.
range properties, open close dataset properties,
set them back to normal after running report.
or to use the dialog of the report
change code
to connect to the outside frxdbdatasource datasource to populate the listbox.
ie
assumes band4 is connected to frxdbdatasource
procedure DialogPage1OnShow(Sender: TfrxComponent);
begin
CheckListBox1.Items.clear;
band4.dataset.first;
while not band4.dataset.EOF do
begin
CheckListBox1.Items.Add(VarToStr(<Customers."Company">));
band4.dataset.Next;
end;
band4.dataset.first;
end;
code for obp of band is the same as in the demo
I have many files FR3 and I can not change this at any!
I tried to use the OnBeforePrint event of frxReport component: