Get database connection from report

edited 11:56PM in FastReport 3.0
Hi,
When design a new report. I have to create a new query and store it in the
report file. The query requires database name that it need to connects to.
Is there any way that I can use the database that I already opened in my
program for the query in the report file instead of creating new database
instance in the report and point my query to that database instance?
Thanks
SN

Comments

  • diaswdiasw Germany
    edited 11:56PM
    Hi ncson,

    I'm using a Form in Delphi (FR3.08 and Firebird 1.5), there I added
    TfrxDBDataset, showing in property 'Dataset' to
    TpFIBDataset, showing in property 'Database' to Application's-TpFIBDatabase
    That's it. Same works with queries.

    Regards
    Sascha




  • edited 11:56PM
    Hi Sascha
    That is the way it works in tha main program. How could I access TfrxDBDataset properties within the report script?

    Example I do have a frxDBdataset named as fxDS1 from the data tree in the report designer. <frxDBdataset ."Field1"> work fine and return value of Filed1 fron this dataset. But I don't know how to refference to the dataset property of frxDBdataset because <frxDBdataset.Datasource> doesn't work.

    Thanks
    SN

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.