How to find RecordCount?

Hi all,
I want to access the recordcount of MasterDataBand's dataset at OnBeforPrint event of a ReportSummary band. How can I do this?

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 8:16PM
    here is a sample on the reports code page

    var
    masterecordcount:integer; //declare global var

    procedure ReportSummary1OnBeforePrint(Sender: TfrxComponent);
    begin
    memo7.memo.clear;// how to clear a text objects memo
    memo7.memo.add('[masterecordcount]'); // add var to text object
    // use in an expression
    // if masterecordcount = somevalue then
    end;

    procedure Band2OnAfterPrint(Sender: TfrxComponent);
    begin
    inc(masterecordcount);// increment var
    end;

    begin
    masterecordcount:= 0;// initialize
    end.

    here is another sample for your previous post

    procedure Footer1OnBeforePrint(Sender: TfrxComponent);
    begin
    While engine.FreeSpace - (footer1.height + Child1.height) > child1.height do
    begin
    with Engine do showband(child1);
    end;
    end;
    ;)

  • edited 8:16PM
    You can send RecordCount of the Query through a variable too...

    regards.
  • gordkgordk St.Catherines On. Canada.
    edited 8:16PM
    Yes you can. However if you are hiding any bands then you may get a bad count.
    ;)

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.