Results 1 to 3 of 3

Thread: Crystal Report very slow on first load

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2006
    Location
    Netherlands
    Posts
    817

    Crystal Report very slow on first load

    Hello,

    I have a piece of code that prints an empty page.
    Code:
     Private Sub pnKassa_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles pnKassa.Click
        Me.Cursor = Cursors.WaitCursor
        Dim cryRpt As New ReportDocument
        Dim ReportPath As String = Application.StartupPath
        cryRpt.Load(ReportPath & _LocatieOverzichten & "crLEGEPAGINA.rpt")
        'Druk het overzicht af naar de standaard printer
        cryRpt.PrintToPrinter(1, False, 0, 0) 'Stuur het overzicht naar de default printer
        '********************
        Me.Cursor = Cursors.Default
      End Sub
    The first time I run the code the report takes like 15 seconds to print.
    When I run the code the second time it only takes about 3 seconds.

    What am I doing wrong?
    Should I load the report one time when the application starts so that all of my reports load faster?

    Thanks in advance!!!

  2. #2
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,206

    Re: Crystal Report very slow on first load

    That's not unusual, here's a thread that talks about it. http://www.vbforums.com/showthread.p...hlight=crystal

  3. #3
    Frenzied Member
    Join Date
    May 2006
    Location
    some place in the cloud
    Posts
    1,886

    Re: Crystal Report very slow on first load

    Should I load the report one time when the application starts so that all of my reports load faster?
    Crystal reports takes time to load its engine the first time it is invoked
    You could try to open a dummy rpt when your application starts and catch the exception
    ...you could use another thread to do it...
    JG


    ... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width