Dynamic datasets
hi all
I am building a reporting tool, in which the end user can design and run his/her own reports.
To design reports I use a different dataset then when a report is finally run.
For example:
dsAdmin -> Create reports
dsReport -> Run reports.
Can anybody tell me how to do this using FastReports. As far as I understand the source of the columns used on the report is stored in the report itself. so this I will have to change run-time.
Also, does anyone have experience with an issue like this and maybe already solved it :-)
Cheers
Anton
I am building a reporting tool, in which the end user can design and run his/her own reports.
To design reports I use a different dataset then when a report is finally run.
For example:
dsAdmin -> Create reports
dsReport -> Run reports.
Can anybody tell me how to do this using FastReports. As far as I understand the source of the columns used on the report is stored in the report itself. so this I will have to change run-time.
Also, does anyone have experience with an issue like this and maybe already solved it :-)
Cheers
Anton
Comments
the databand through the dataset controls cursor movement in the table or query to which it is connected. The actual data connection is through the datafield variable placed in the memo(rectangle object) in the band.
ie
If the memo contained [table1."fieldname"] then the datasource property of whatever frdbdataset the band's datasource property is set to,must point to table1.
regards
Thing is that the name of the dataset seems to be stored in the report. In what I am trying to do , this dataset changing.
When the report developer is building the report, he will use a dataset called dsAdmin. Once the report is finished, it can be called upon from another screen in the same application, this time however the dataset will on-the-fly be set to dsReport.
I tried to use an alias, but that does not seem to work either.
in the datadictionaty I have it set up like this:
dmMain.dsAdmin (Administrator)
when the report is run from theother screen it looks likes this:
dmMain.dsReport (Administrator)
I also change the dataset of the frDBDataset to point to the other dataset, problem is that only the data from the first row will be printed for each row in the dataset.
Regards
As expected, the field aliases are stored in the report file. What I forgot to do is to remove the fieldvariable for the dataset alias pointing to dsAdmin.
I replaced it with a fieldvariable for dsReport alias and it works like a charm.
Cheers
Anton