R – Why creating a new Crystal Report object in VB6 takes a long time


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?

Best Solution

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.

Related Question