paging problem in winforms
Hi!
I work with C#.NET in a product that generates reports using the .NET CrystalReportViewer in Visual Studio 2008.
When a multi-page report is generated, I click the "next page button", and I'm taken to the next page in one second or two. When i use "go to" box, the viewer is too slow, more than 30 seconds and even minutes! If I click the "last page" button, it takes me to the last page in 10 minutes or more!
The reports often have more than 600 pages.
I did a debug from the code and there is no problem with the database, query, and so on.All the process take only few seconds . I think the problem is in the CrystalReportViewer.
Has anyone encountered this issue before? Any input would be appreciated.
The code:
public void print(string tipocomp, string nrolote)
{
DataTable rows = someClass.searchMovFac(tipocomp, nrolote);
DsFactura _facturaDS = new DsFactura();//DataSet DsFactura
_facturaDS.movimientos.Merge(rows);
frmFacturas vistaFormAB = new frmFacturas();//winform
switch (tipocomp)
{
case "A":
FacturasA facturaA = new FacturasA();//Report
facturaA.SetDataSource(_facturaDS);
//vistaReport is a CrystalReportViewer
vistaFormAB.vistaReport.ReportSource = facturaA;
break;
case "B":
FacturasB facturaB = new FacturasB();
facturaB.SetDataSource(_facturaDS);
vistaFormAB.vistaReport.ReportSource = facturaB;
break;
}
vistaFormAB.Show();
}
}
|