Assign more Datasources to Bands at runtime
Hi guys...
I have 3 TQuery components, I cannot active in designtime, only in runtime.
I designed my report, these Query components appear in the data dictionary, but when i create variables, the fieldnames of each query component does not show ovbviously...
My problem is:
When i add a masterdata band, the only datasource i can select is virtual dataset ...
How could i add a datasource to this band at runtime, before preparing report ?
I tried this but got an error of <span style='color:red'><span style='font-size:9pt;line-height:100%'>invalid class typecast</span></span>
well, this code is for one of the query components...
i have 3 which i would like to show in report...
i know it could be done with tfrdbdataset ... but the report supports only 1...
any ideas ? thanks a lot
I have 3 TQuery components, I cannot active in designtime, only in runtime.
I designed my report, these Query components appear in the data dictionary, but when i create variables, the fieldnames of each query component does not show ovbviously...
My problem is:
When i add a masterdata band, the only datasource i can select is virtual dataset ...
How could i add a datasource to this band at runtime, before preparing report ?
I tried this but got an error of <span style='color:red'><span style='font-size:9pt;line-height:100%'>invalid class typecast</span></span>
var
 t: TfrBandView;
begin
 t := TfrBandView(Report.FindObject('myBand'));
 if t <> nil then
  t.DataSet := 'myDataSet';
 report.preparereport;
 report.showreport;
well, this code is for one of the query components...
i have 3 which i would like to show in report...
i know it could be done with tfrdbdataset ... but the report supports only 1...
any ideas ? thanks a lot