Row count on the Report title band

serifelsenserifelsen Unknown
edited 8:09AM in FastReport 4.0
I have report title child band to show the short description about a report like date, number of pages, number of records and so on.

"AbsRow#" works perfect on the Data band but I want to print total number of record on the title band.

How can I do that?


Thanks in advance

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 8:09AM
    make report 2 pass, gather values on first pass sub into objects on second pass.
    see the main demo totals in header report for hoe to do it.
  • serifelsenserifelsen Unknown
    edited February 2011
    gordk wrote: »
    make report 2 pass, gather values on first pass sub into objects on second pass.
    see the main demo totals in header report for hoe to do it.

    sorry i didn't get your idea. can you explain it in an other way?
  • gordkgordk St.Catherines On. Canada.
    edited 8:09AM
    read the user manual chapter on script
    printing the group's sum total in the groups header.
    use the same principle
  • serifelsenserifelsen Unknown
    edited 8:09AM
    gordk wrote: »
    read the user manual chapter on script
    printing the group's sum total in the groups header.
    use the same principle

    Thanks gordk.

    Solution is:

    private void Child1_BeforePrint(object sender, EventArgs e)
    {
    // Get data source
    DataSourceBase ds = Report.GetDataSource("queryName");

    // initialize it
    ds.Init();

    // Get row count
    txtRowCount.Text = ds.RowCount.ToString();
    }
  • gordkgordk St.Catherines On. Canada.
    edited 8:09AM
    that is fine for record counts of datasets, but will not give you pages and totals of values,
    particularly if dataset rowheight is stretching

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.