total pages and double pass

edited March 2010 in FastReport .NET
When i use double pass option in the report, it will show the real total pages but will disable the data which i put in the header page. If i turn double pass to off the data will show again. So how can i make the total pages and my data both show on the report? thanks!

Comments

  • edited 7:32PM
    Hello,

    You should not place any data columns in the report title/page header/footer. At this time, the datasource may be in the random state. For example, in the single-pass report, the datasource position = 1st row, and you see the correct data. If you set doublepass, at the second pass the datasource is in EOF state and you see nothing.
    If you still need to place databound fields in the report title, create the ReportTitle.BeforePrint event handler and write the following code in it:

    Report.GetDataSource("the name of your datasource").Init();
  • edited March 2010
    I tried like below, but it still couldn't work. you can only see the data in the head of first page, other pages display none.

    using System;
    using System.Collections;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Windows.Forms;
    using System.Drawing;
    using System.Data;
    using FastReport;
    using FastReport.Data;
    using FastReport.Dialog;
    using FastReport.Barcode;
    using FastReport.Table;
    using FastReport.Utils;

    namespace FastReport
    {
    public class ReportScript
    {
    private void ReportTitle_BeforePrint(object sender, EventArgs e)
    {
    Report.GetDataSource("Table").Init();
    }
    }

    }
  • edited 7:32PM
    Please send your report file to tz@fast-report.com.
  • edited 7:32PM
    Dear Alex:

    I didn't receive you mail about my question. Could you help me to fix if i need put databand field in the report title. if i only have one data but two pages, how can i make sure in every title of the page is show on same data.

    ex: if one order have two pages, the order title should be same (like order number,order date).

    Hope you can understand what i means, thanks!




  • edited 7:32PM
    Hello,

    I didn't receive the report file yet. Could you please resend it?

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.