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

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 2:29AM
    The frdbdataset,fruserdataset, virtualdataset
    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 ;)
  • edited 2:29AM
    Thanx, but I got that far already.

    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
  • edited 2:29AM
    Done, I figured it out it ;)

    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

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.