I work with asp.net, C# on Visual studio.net 2013 and crystal report. I met some issue, could someone give me advice on resolving the issue?
1. crystal report viewer:
in the page_init(), I had the code:
if(!IsPostBack())
{
this.objRpt = new ReportDocument();
CrystalReportViewer1.ReportSource= this.objRpt;
Session["ReportDocument"]=this.objRpt;
}
else
{
this.objRpt = (ReportDocument)Session["ReportDocument"];
CrystalReportViewer1.ReportSource= this.objRpt;
}
when I run the application, the report was shown on the page with Report Viewer. I clicked the next button on the report viewer, there is a message popup show "please wait while the document is being process" and I wait for some time to see the next page, then I click the next page button again, everything is fine. Why I need to wait some time to see the next page when I click the next page first time? How can make the first time click next page as the same as the second, third.. time (no message "please wait while the document is being process" pop up and work fine?
2. Generating the PDF with same report run in VB6 and VS.Net 2013 asp.net.
in VB6, only need 30 seconds, but in VS.Net C#, it need to 3 minutes and 30 seconds on the user's machine. I tested in my development environment with a tool. I found it need 96 seconds on my development env (localhost) to generate the PDF, but 94 seconds was used by the C# statement:
stream PDFout= objRpt.ExportToStream(crystalDecisions.Shared.ExportFormatType.PortableDocFormat);
How can improve the performance when I generate report PDF file in asp.net web application? change ExportToStream with other statement?
Thanks for any help!