Report dataset SQL

How do I get the SQL text from a TfrxADOQuery in my FastReport? I want to access the SQL so I can alter it at run time.

I want it to work like this:

tQryText := frxReport1.Dataset.Sql;
frxReport1.Dataset.Sql := tqyrText + 'order by name';


Any input would be appreciated! Thank you!

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 6:05AM
    the sql statement is a property of a query not of any dataset
    typically write code to load report and then use the find object method to locate the query,
    cast it to its type and set its properties before calling show or prepare.

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.