Skip to Content
avatar image
Former Member

Taking so long "please wait while the document is being processed crystal"

*Please help me, my print-out are taking 10 to 15 minutes before you can print it. it's just saying "Please wait while the document is being processed crystal"..(Please see picture)

*And this is my setup,

*This is my code for the connection,..Etc.

Imports System.Data.SqlClient

Imports CrystalDecisions.CrystalReports.Engine

Imports CrystalDecisions.Shared


Public Class Non_VehicleGatePass_1

Dim orpt As New ReportDocument

Dim ci As String


ci = Me.TextBox11.Text

orpt = New Non_VehicleGatePass_1_Report

Dim user As String = "user"

Dim pwd As String = "pass"

orpt.SetDatabaseLogon(user, pwd)

orpt.SetParameterValue("@@NVGP1", ci)

Non_VehicleGatePass_1_Print.CrystalReportViewer1.ReportSource = orpt

Non_VehicleGatePass_1_Print.MdiParent = MainForm


*I'm using

-Visual Studio 2013

-SQL Server 2008 R2

capture.png (14.7 kB)
capture2.png (144.7 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    Mar 16, 2017 at 06:15 PM

    Don't use @ in the parameter name

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 11, 2016 at 03:43 PM

    Which version of the SDK are you using? You can get the latest from here:

    There are many things that affect how long it takes a report to run:

    1. If it's the first time any report is loaded, all of the Crystal assemblies have to load into memory which takes some time. The next time a report is run after this, it should be much faster.

    2. In the following situations, Crystal will load data into memory and process it there, which significantly slows a report:
    a. The report uses connections to more than one database.
    b. The report uses either multiple stored procedures or a stored procedure linked to tables or commands.
    c. The report uses either multiple commands or a command linked to tables or stored procedures.
    d. The Select Expert includes Crystal functions other than IsNull() which cannot be sent to the database for processing.
    e. The report connects to a file based database such as dBase, Paradox, Excel, or FoxPro where there is no server software to process the data.

    3. "Page N of M" or "TotalPages" is used in a report that contains many pages - Crystal has to process ALL of the pages before showing the first page in the viewer. Without those, it will show the first page as soon as it's ready and continue processing the rest of the pages.


    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks for the reply..i'm using "CRforVS_13_0_11", i already use the new version but same result,

      1, it's not just the first time that report is loaded, like you said in no. 1.even i already run the program (already use the report) when i re-use it, it's still taking to long.

      2. i think this is the reason, but i can't know how to resolve it.

      when my data base is new (nothing much data) it's faster to print, when my data are more than 50k, then the problem emerge..

      3. my report is just 1 page, nothings follow.

      please help me for this. i really don't know what to do with this problem..

  • Nov 18, 2016 at 06:03 PM

    There are a number of things that could be causing this. What type of database are you connecting to? How many tables are you using in your report? Are there indexes on the tables? Also, please post the formula from the Select Expert.


    Add comment
    10|10000 characters needed characters exceeded

  • Nov 18, 2016 at 09:35 PM

    How are you connecting to the DB, ODBC or OLE DB?

    Try the other one and see if that helps.

    Any Subreports?


    Add comment
    10|10000 characters needed characters exceeded

  • Nov 18, 2016 at 09:48 PM

    Hi Eduard,

    If you run the report in Crystal, does it take just as long or does it run fine with a large set of data?

    I don't think it would be your code but rather how the report was designed. As Dell asked in #2, these are things that can cause a report to run slow. I had a report using a SQL Command linked to a table and it took over 45 minutes to run when a view in SQL Server took less than a minute. Changing my report to using a view made a huge difference.

    Have a look at the report and see if it can be optimized better. If you can give us more information on how the report is designed that will help us figure a solution.



    Add comment
    10|10000 characters needed characters exceeded