Store SQL-query in report

Hi,

I want to make a program where users can select different reports to view data in a database. In the different reports are different groupings (one has total hours per month, another hours per project per month and another hours per worker per month).

The groupings only work good when you sort records by the same field as you group them. So I can't use just one dataset for all the different reports, unless you can store the sortingfields or complete query in the report.

I use KaDao-datasets (not the BDE).

I've tried to change or set the query with code in the OnStartReport-event, but you can't access a datasetobject on your delphi-form from within Fast-Report.

Who helps?

Comments

  • FRNLFRNL Hoogeveen - Netherlands
    edited 1:31PM
    Hi,

    I would suggest to try the other way around. As I read your question, you want to update the SQL text in a query component on your form, I suppose that is before executing the report.

    Why not update the SQL and after that start running the report?

    (even een toevoeging: als ik de juiste M. de Reus voor heb, dan bent u klant bij mij en mag u deze vragen per mail sturen. Dan heeft u het antwoord een stuk sneller binnen).

    Groeten,
    Teo

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.