views:

75

answers:

1

I am developing software using VB6 and Crystal Reports 8.5.

When debugging I have found that it takes a long time for the compiler to create a new Crystal Reports object.

Here is the code:

Private mobjReport As rptProject

Private Sub Form_Load()
    Set mobjReport = New rptProject   ''takes long time do to
    mobjReport.txtSerial = GetLastSerialNumber
End Sub

Why is this and how can I make it faster?

+1  A: 

Try creating a report that doesn't load any data from your database and see how long that takes. I suspect what is slowing you down is the SQL statement(s) the report is using. If an empty report is substantially faster than what you're doing now, then please post your SQL and we'll see if we can help with that.

Jon B
I did what you said and created a simple Crystal report with a file containing it's viewer. But as I had said before, when it goes to create a new report object, takes long time.
odiseh
How long does it take?
Jon B