Preview CR

  • Thread starter Thread starter Agnes
  • Start date Start date
A

Agnes

When My application loading the Crystal report. It seems I can't use the
vb.net application until the report is loaded.
I can't run another form during report is loading.
How can I solve this ??
thanks
 
When My application loading the Crystal report. It seems I can't use the
vb.net application until the report is loaded.
I can't run another form during report is loading.
How can I solve this ??


This is due to the fact the UI thread (main thread) is tied up generating
the report.

You can try running the the report on a separate thread - but CR is COM
based... so I never had too much success doing it that way.

Another possiblity is to use CR.NET's "Push" model.

The Push model uses a ADO.NET dataset to pass data to CR. Rather than
connecting directly to the database, you fill a dataset and pass it to CR.
Fill the dataset on a separate thread and this will prevent the GUI from
lock up during report generation. Once the dataset is filled, you assign it
to the Report's DataSource property. Thus, the report will only be locked
up for a split second for layout - rather than for the long query time.

Hope that helps.
 
Back
Top