Row count on the Report title band

serifelsenserifelsen Unknown
edited 12:13AM 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 12:13AM
    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 12:13AM
    read the user manual chapter on script
    printing the group's sum total in the groups header.
    use the same principle
  • serifelsenserifelsen Unknown
    edited 12:13AM
    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 12:13AM
    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