Using Databases from the project in the report

edited 2:21PM in FastReport 4.0
Hello,

I am switching from Quickreport (with QRDesign) to Fastreport. In the Quickreport/QRDesign-Designer I was able to use the connection to the Database I have already in my project by using the AvailableDatabaseNames-Property.
These Connections where used by my reports and the querys are attached to them.
In Fastreport I can add a Connection (TIBCConnection, it's the TDatabase of IBDAC [img]style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />) to the report and set the Database-Connection-String and the login-data but I dont want to do that, I want the connections fom my project in my report and using them for my querys in the report. I trieed to add the connection, respectively to change the connection-string of the connection if there is already a connection with the name. That works in the LoadReport-Event of the TfrxDesigner or after creating a new report after creating a TfrxDesigner-object, but using the new-button in the designer I can't add new connections. And it is not that, what I want, because ist a new connection and not the existing. Is there a possibility to do that? Greetings Jan[/img]

Comments

  • edited 2:21PM
    Hi,

    I have a solution for my problem, I have created my two Versions of the Database-Class (descendant of TfrxDACDatabase). Each is looking for a specific Connection in my project and uses this. Then I have changed the TfrxDACComponents-Class, and have added an other GetDatabaseClass-Funktion for my second database.
    Now I have two Database-Classes in the Designer For eache Connection one. I have still to add them to the report, but its ok (A OnNewReport-event would be nice [img]style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />). I think with other access-components you can do the same. Greetings Jan[/img]

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.