on 04-23-2014 9:04 AM
crystal report 10.5 in vs 2008 display at extremely very slow speed in development server and production server. i have loaded a dataset as the datasource for the report. i also checked the code in debugging mode to know where the delay is but found out it is not from the code as the code executes to the end in less than a minute but the browser keeps loading for several minute before display.
please kindly help to resolve this issue.
Try SP1 for CR for VS 2008.
https://smpdl.sap-ag.de/~sapidp/012002523100009351512008E/crbasic2008sp1.exe
What happens when you out the data from the dataset to a datagrid instead of a crystal report?
Thanks,
Bhushan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There are couple of things to consider:
1) The Crystal reports engine is required to make a copy of the dataset (MS for various security reasons, does not allow 3rd parties direct access to the dataset). So this will take some time.
2) If this is a muti-table dataset, there are no indexes that the CR engine can use. Thus any linking between the tables will again cause performance issues. See kBA: 1218428 - Slow performance when using ADO .NET dataset in .NET application
Updating your app to use Crystal Reports 2008 (v. 12.x) may also be worth trying as there are always performance improvements from version to version of CR. An Eval of CR 2008 can be downloaded from here:
SAP - Crystal Reports 30-Day Evaluation
Please note that there no plans to release anymore updates / fixes for Crystal Reports Basic for Visual Studio 2008.
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter
To add to this, you also want to avoid using "Page N of M" or "TotalPages" in your report. When you use these, the Crystal runtime has to render all of the pages in the report prior to displaying it. When you don't use them, it will display the first page as soon as it's been rendered. For small reports, this is not a big deal, but for large ones or reports that are showing a lot of data on each page it can cause a significant performance hit.
-Dell
What type of database are you connecting to? Are you just connecting tables in your report? Or do you have a combination of commands and tables? What is your selection formula (from the Select Expert)? Are all of the conditions in your selection formula included in the SQL that Crystal generates? (Go to Database menu and select "View SQL".)
It's possible that not all of the query is being pushed down to the database so Crystal is doing joins and/or filters in memory. With the above information, we can better help you determine what might be happening.
-Dell
Hi Victoria
I think we're back to my post from Apr 23. As you are using datasets, the report has no idea that there is any database there, be it MS SQL, Oracle or what ever. Sometimes, connecting directly to the database is actually faster than using datasets for the reasons I mentioned on April 23.
- Ludek
I actually tried to work with your April 23 suggestions . I got the crystal report 2008 - 30 days evaluation: still working on it.
Also i will like you to help me with links on connecting crystal report directly to database at runtime. am more familiar with dataset and ODBC - DSN methods. i will like to explore your two alternative as am running out of time to deliver.
Thanks.
With CR 2008:
For OLE DB then use:
MS SQL 2005 - OLE DB Provider
MS SQL 2008 - SQL Native 10
For ODBC then use:
MS SQL 2005 - SQL Native
MS SQL 2008 - SQL Native 10
Once you have a report created, you can use the following code at runtime:
Public Sub New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
'Create an instance of the strongly-typed report object
crReportDocument = New CrystalReport1()
'Setup the connection information structure to be used
'to log onto the datasource for the report.
crConnectionInfo = New ConnectionInfo()
With crConnectionInfo
.ServerName = "escalade" 'physical server name
.DatabaseName = "Pubs"
.UserID = "sa"
.Password = "admin"
End With
'Get the table information from the report
crDatabase = crReportDocument.Database
crTables = crDatabase.Tables
'Loop through all tables in the report and apply the connection
'information for each table.
For Each crTable In crTables
crTableLogOnInfo = crTable.LogOnInfo
crTableLogOnInfo.ConnectionInfo = crConnectionInfo
crTable.ApplyLogOnInfo(crTableLogOnInfo)
Next
'Set the viewer to the report object to be previewed.
CrystalReportViewer1.ReportSource = crReportDocument
End Sub
And be careful with subreports. If you use the same connection type as for the main report the subreport should piggy back on the main connection. If you use a different connection, you'll have to use code to connect the subreports:
//loop through all the sections to find all the report objects
foreach (CrystalDecisions.CrystalReports.Engine.Section crSection in crSections)
{
crReportObjects = crSection.ReportObjects;
//loop through all the report objects to find all the subreports
foreach (CrystalDecisions.CrystalReports.Engine.ReportObject crReportObject in crReportObjects)
{
if (crReportObject.Kind == ReportObjectKind.SubreportObject)
{
//you will need to typecast the reportobject to a subreport
//object once you find it
crSubreportObject = (CrystalDecisions.CrystalReports.Engine.SubreportObject)crReportObject;
string mysubname = crSubreportObject.SubreportName.ToString();
//open the subreport object
crSubreportDocument = crSubreportObject.OpenSubreport(crSubreportObject.SubreportName);
//set the database and tables objects to work with the subreport
crDatabase = crSubreportDocument.Database;
crTables = crDatabase.Tables;
tableIndex = 0;
bool SecureDB;
//loop through all the tables in the subreport and
//set up the connection info and apply it to the tables
foreach (CrystalDecisions.CrystalReports.Engine.Table crTable in crTables)
{ // check if integrated security is enabled
SecureDB = crSubreportDocument.Database.Tables[tableIndex].LogOnInfo.ConnectionInfo.IntegratedSecurity;
string TableName = crTable.Name.ToString();
tableIndex++;
crConnectioninfo.ServerName = "VMW2K8CRSE2K8";
//if (!SecureDB)
{
crConnectioninfo.UserID = "sa";
crConnectioninfo.Password = "PW";
crConnectioninfo.DatabaseName = "QTYLTD";
}
crTableLogOnInfo = crTable.LogOnInfo;
crTableLogOnInfo.ConnectionInfo = crConnectioninfo;
crTable.ApplyLogOnInfo(crTableLogOnInfo);
}
}
}
}
rpt.VerifyDatabase();
For more info:
SAP Crystal Reports .NET SDK Developer Guide
SAP Crystal Reports .NET API Guide
http://scn.sap.com/docs/DOC-21967
http://scn.sap.com/docs/DOC-21953
(Not sure if I gave you the last two links already.
- Ludek
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.