SOLVED(meanwhile). My solution was passing the data through a DataTable
. The waiting time changed from 10 seconds to 1 second. My story:
I am currently working on a web project with vs.net 2012 and Crystal Report v13. During the report design, the report Oldb
connection was fine with the time, but when I load the report in asp.net, reporting slow loading 10 seconds. I was using the SetDatabaseLogon
function to pass the username and password of connection.
After reading out there, some people thought the problem was in the method of connecting to the database of crystal report, and they recommended not to connect the report to the database, it is better to pass to the report, a dataSet
because the connection to the database is much faster through asp.net application.
I did so, I load the data into a DataTable and assign it to the report, in its setDataSource property and burden of reporting was 1-2 seconds.
This is my function:
protected void Page_Load(object sender, EventArgs e)
spTituloVisor.InnerText = "Consulta de Anticipo";
string val = Request.QueryString["ValD"];
int id = Convert.ToInt32(CryptoAES.descifrarTextoAES(val));
ReportDocument Rpt = new ReportDocument();
Rpt.SetDataSource(Core_PBL.Rpt_Consulta_Anticipo(id)); CrystalReportViewer1.ReportSource = Rpt;