SQL vanuit Delphi 10.4 naar overnemen

Vanuit Delphi10.4 heb ik een programma lopen die met keuzes van de gebruiker een SQL database aanroept en deze gegevens op het scherm toont in een tabel. Dit werkt goed.

Nu wel ik de gegevens die met deze SQL opgehaald zijn afdrukken. Ik heb in fastreport een mooie layout gemaakt en deze laat ook gegevens zien. Maar ik wil afhankelijk van de SQL in Delphi deze gebruiken in Fastreport.

Hoe zet ik de SQLtext over naar Fastreport.

Ik heb in het report een ADOquery staan met een parameter SQL deze wil ik dus aanpassenl

Comments

  • From Delphi10.4 I have a program running that calls a SQL database with user choices and displays this data on the screen in a table. This works well.
    
    Now I print the data retrieved with this SQL. I made a nice layout in fastreport and it also shows data. But depending on the SQL in Delphi I want to use it in Fastreport.
    
    How do I transfer the SQLtext to Fastreport.
    
    I have an ADOquery in the report with a SQL parameter, so I want to adjust itl
    


  • PolomintPolomint Australia
    edited February 2022

    G'day Jan,

    (Sorry I don't read or speak Dutch.)

    A few questions:

    • What have you tried to do so far?
    • At what point in the processing for the Report do you need to "adjust" the SQL?
    • Can you confirm that the ADO Query is linked to your Report via a TfrxDBdataset Component?
    • Your translation above has the phrase "SQL parameter" in it - are you trying to use a parameterised query?

    The TADOquery Component is accessible from both the Delphi IDE and the running code.

    In the IDE you can set the SQL via the Object Inspector after selecting the ADO Query object.

    In your code you can create a "BeginDoc" Event and set the SQL.Text for TADOquery there.

    Our Apps vary in complexity and some of our Reports have quite dynamic SQL requirements. FastReport accommodates this very well...

    Cheers, Paul

  • Hello Paul

    Here's reading a lot to learn a bit more about the SQL language and the connections.

    When I am a bit further I report back on the forum.  

    Thanks Jan


    I

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.