cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Report 10.5 very slow (30 minutes) to display

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

former_member188030
Active Contributor
0 Kudos

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

Former Member
0 Kudos

i have installed crbasic2008sp1.exe. it still slow when i out the dataset to a gridview it displays almost immediately. but crytal report is taking forever.

thanks

former_member183750
Active Contributor
0 Kudos

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

DellSC
Active Contributor
0 Kudos

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

former_member183750
Active Contributor
0 Kudos

Good point Dell . And one more thing; make sure you have a default printer driver installed.

- Ludek

Former Member
0 Kudos

i have a default printer installed. it displays few records on time but records above 10,000 takes 30 minutes and i am not using page n of m. those it has to do with memory, temp files or something.

thanks

DellSC
Active Contributor
0 Kudos

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

Former Member
0 Kudos

i am connecting to sql server. my report is design based on tables from a dataset. the dataset is filled at run time and pushed to crystal report as source data. links are already established at design period.

former_member183750
Active Contributor
0 Kudos

Hi Victoria

I think we're back to my post from

Former Member
0 Kudos

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.

former_member183750
Active Contributor
0 Kudos

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

Answers (0)