total pages and double pass
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
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();
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();
}
}
}
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!
I didn't receive the report file yet. Could you please resend it?