Access Internal Dataset Objects

I have a report with an internal TfrxADOQuery object (on the Data page), and I would like to know its record count before previewing the report. Is this possible?
There is a way to access the report's page objects (data bands, text boxes, etc), but I can't find a way to get to the tables/queries.
I've tried storing the record count in a variable and accessing that, but the query is closed in every event I've tried.

Does anyone have a suggestion for me?

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 8:27PM
    in the report code page
    var
    ds1:tfrxdataset;
    rc: integer
    //add code in the empty begin end. block
    begin
    ds1:= report.getdataset('datasetusernamet');
    rc:= ds1.rowcount;
    end.
  • edited 8:27PM
    Thanks. I'll give that a go.

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.