Changing DataSets
I have this setup:
FfrxDBDataset.DataSet := aDataSet // a TTable
FReport.DataSet := FfrxDBDataset;
FReport.DesignReport; // shows the table
FReport.ShowReport; // shows the table
// so far so good. Now:
FfrxDBDataset.DataSet := aDataSet // a TQuery with one record
FReport.DesignReport; // still shows the table!!
FReport.ShowReport; // still shows the table!!
How do I get the report to show the current contents of "aDataSet"?
TIA,
Jim
FfrxDBDataset.DataSet := aDataSet // a TTable
FReport.DataSet := FfrxDBDataset;
FReport.DesignReport; // shows the table
FReport.ShowReport; // shows the table
// so far so good. Now:
FfrxDBDataset.DataSet := aDataSet // a TQuery with one record
FReport.DesignReport; // still shows the table!!
FReport.ShowReport; // still shows the table!!
How do I get the report to show the current contents of "aDataSet"?
TIA,
Jim
Comments
the tfrxreportcomponents dataset property is ony used with multiple design page reports.
it controls the number of times a report is run.
usually your masterdataband's dataset property points to the frxdbdataset.
you can set the frxdbdatasets properties.
things can get very messy if you start changing datasets as the report design remebers the dataset used and its field names.
I don't follow your last sentence: are you saying that even if I correct it to be, e.g.:
TfrxMasterData(FReport.FindObject('MasterData1')).DataSet := aDataSet
the report won't use the new records/fields in "aDataSet"?