cancel
Showing results for 
Search instead for 
Did you mean: 

Reports that are slow to load

Former Member
0 Kudos

I am adding a report in my project at the vb.net 2005 but they are slow to load. What is the best way to do this task to be loaded into faster?.

I am using the Crystal Report version 2008 with Visual Studio.Net 2005 in a Windows application.

The evidence I have done so much in development environment as user stations, in both situations the burden of reporting slow.

I am adding the reports through a Crystal Report Viewer

Very thanks and greetings from Costa Rica.

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Anibal, when you say the report is slow, what are you comparing to? E.g.; is the report faster in the CR designer? Do you see the reports run faster after you run the 1st report?

Ludek

Former Member
0 Kudos

Thanks for your answer Ludek. At the same answer you:

The Reports in the form of vb.net slower than the designer of crystal reports, certainly the first time that load in the form is slow but the following if you are so fast as in the designer.

former_member183750
Active Contributor
0 Kudos

If I understand correctly (apologies, the language is getting in the way a bit here ), you see the 1st load slow, subsequent loads are acceptable?

This is known and expected. On 1st load, the application needs to load all the CR assemblies, the report engine, the database engine, etc., etc. This leads to slow 1st load. Once al the runtime is loaded, the performance normally gets much better. The only way to improve this, is to load the CR runtime on app start. Essentially, you load a report in the background at app start. This will make your app load slower as you are eating up the CR runtime load time on start of the app, as opposed to on load of 1st report.

Ludek

Former Member
0 Kudos

Some have one example of how load a report in the background at app start? . I am even with the disadvantage that the reports are slow to load. And I need some form solvertar the issue that causes me the slow loading. I am using at Visual Studio.net 2005 and Crystal Reports 2008.

Thanks!!

former_member183750
Active Contributor
0 Kudos

well, what I meant re. load in the background, is to instantiate the report object at the same time you start your app. The load a report, dispose of the report and that should load the dlls.

e.g.

report.load (<path\my report.rpt>;)

report.close()

report.dispose()

Ludek

Former Member
0 Kudos

Ludek greetings, sincerely appreciate your help. Trying to apply what you suggest me to instantiate a report I put the following code in the load of the form that contained in the report.

Dim Reporte As New Vta___Sugerido_Pedidos

CrystalReportViewer1.ReportSource = Reporte

Reporte.Load()

End Sub

But I have no better in the speed of loading of the report, is even slower.

I have something wrong in the code?

Grettings from Costa Rica

former_member183750
Active Contributor
0 Kudos

Perhaps rather that using hte viewer to load the report, try using hte engine:

Dim crReportDocument As New CrystalDecisions.CrystalReports.Engine.ReportDocument()

crReportDocument.Load("C:\Crystal\myReport.rpt")

crReportDocument.close()

crReportDocument.dispose

Ludek

Former Member
0 Kudos

Look at where and as I put the code Ludek

Private Sub Frm_Reporte1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim Reporte As New CrystalDecisions.CrystalReports.Engine.ReportDocument()

Reporte.Load("
glauco\Reportes\Ventas 08\Vta - Sugerido Pedidos.rpt")

End Sub

However, the form still takes 6 seconds to load and reporting over 2 seconds.

I said, I'm only using a CrystalReportViewer in which I have directed the report from the server by selecting Properties from the menu ReporSource of CrystalReportViewer.

Do not know if this will have something to do. Honestly, I have worried about this situation because I have everything ready to take the project as soon as possible.

Again, thank you very helpful.

former_member183750
Active Contributor
0 Kudos

Ok, here are a few more suggestions;

1) Ensure that the option "verify on first refresh option" (File | Report Options) is turned off

2) Ensure that the option "verify stored procedure on first refresh option (File | Report Options) is turned off

3) If you have an inserted OLE object ensure it is where the report expects it to be

4) Ensure that the subreport option "Re-import when opening" is not enabled (right click the subreport(s), choose format subreport, look at the subreport tab)

5) Specific printer is set for the report and the printer does not exist. Try the "No printer" option (File | Page setup)

Ludek

Former Member
0 Kudos

Ludek I have revised and implemented your suggestions, I think I have a solution to the problem, only that I do not know if will be a good way so I would like to know your approach.

I am using a form of menu, from where the charge forms that contain reports, then, in the main form (form of menus) I have the following code:

Private Sub Frm_Principal_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Reporte.Load("
Glauco\Reportes\Ventas 08\Vta - Sugerido Pedidos.rpt")

End Sub

Certainly the way it takes a little more now in charge, however reports! NOW IF YOU LOAD WITH QUICK! ;-)!!!!!!

Be so good?

Greetings professor

former_member183750
Active Contributor
0 Kudos

I like that. Essentially, that is what I was after when we first started communicating. Unfortunately with the language issue between us, I think we went a bit sideways.

Ludek

Former Member
0 Kudos

Sure Ludek, in the end the important thing was that despite the language your help me in finding the solution to the problem.

Thanks for your help.

Answers (0)