Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Issue regarding performance of Crystal report 10 Post Reply Post New Topic
Author Message
Shalabh
Newbie
Newbie
Avatar

Joined: 18 Apr 2007
Location: India
Online Status: Offline
Posts: 4
Quote Shalabh Replybullet Topic: Issue regarding performance of Crystal report 10
    Posted: 21 Apr 2007 at 12:03am
Hi,
 
 I am working with VS2005 and CR 10.
I am facing a problem while loading a report.
Actually the problem is, when I run my project, it takes a lot of time to generate a report. The time taken by report to load is about 30 seconds to 70 seconds depending on report to report. I mean there is not much difference in loading the report with 1 page or 500 page.
 
I need the solution that how I can improve the performance of my project.
 
Please take it urgent.
 
Thanks in advance.
 
Regards,
 
Shalabh
shalabh kamboj
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 23 Apr 2007 at 10:59am
What database are you using?  If you're using a client server database like MS SQL Server or Oracle, the easiest way to get a speed increase in a report is to make sure that the database is doing most of the work in the query.
 
Go to the File menu and select Options.  Click on the Database tab and make sure the following are checked:
 
Use Indexes or Server for Speed
Perform Grouping On Server
 
For individual reports, go to the Database menu and make sure that Perform Grouping On Server is turned on.
 
Try to set up your groups so that they are on fields and not formulas.  A formula means that that group and any group under it are processed locally by Crystal instead of by the server.
 
Make sure that your table links are on fields that are indexed in the database - this also helps when you're using a file-based database like Access.
 
These are the thinks I can think of off the top of my head.  Brian may have some others.
 
-Dell
IP IP Logged
Shalabh
Newbie
Newbie
Avatar

Joined: 18 Apr 2007
Location: India
Online Status: Offline
Posts: 4
Quote Shalabh Replybullet Posted: 23 Apr 2007 at 11:11pm
Hi,
 
Well I am using Sql server 2000 as a backend. Actually I have made 1 function, which is used to load the report every time and the maximum time has been taken in that process.
I need to improve the time to load the report.
 
I am sending you the function which is used to load the report.
 

Dim strFile As String

Dim mySubRepDoc As New CrystalDecisions.CrystalReports.Engine.ReportDocument 'Sub report document of crystal report.

Try

strFile = mP_strReportLocation & strReportFileNm & ".rpt"

mP_strReportFileName = strReportFileNm

If IsNothing(mP_ObjCrystalReport) = True Then

mP_ObjCrystalReport = New ReportDocument

End If

mP_ObjCrystalReport.Load(strFile)

''Code Added By STS as on 23-Feb-2007============================

If strReportFileNm <> "rpt_loc_stk01500" And strReportFileNm <> "rpt_loc_SPL00700" Then

mP_ObjCrystalReport.Refresh()

End If

''Code Ends Here==================================================

intCounter = mP_ObjCrystalReport.DataDefinition.ParameterFields.Count 'Check if there are parameters or not in report.

'As parameter fields collection also picks the selection formula which is not the parametermeter, so if total parameter count is 1 then we check whether, its a parameter or selection formula.

If intCounter = 1 Then

If InStr(mP_ObjCrystalReport.DataDefinition.ParameterFields(0).ParameterFieldName, ".", CompareMethod.Text) > 0 Then

intCounter = 0

End If

End If

Thanks in advance.

Shalabh
shalabh kamboj
IP IP Logged
Shalabh
Newbie
Newbie
Avatar

Joined: 18 Apr 2007
Location: India
Online Status: Offline
Posts: 4
Quote Shalabh Replybullet Posted: 24 Apr 2007 at 12:39am
[Hi,
 
Well I am using Sql server 2000 as a backend. Actually I have made 1 function, which is used to load the report every time and the maximum time has been taken in that process.
I need to improve the time to load the report.
I am sending you the function which is used to load the report.
 
Dim strFile As String
Dim mySubRepDoc As New CrystalDecisions.CrystalReports.Engine.ReportDocument 'Sub report document of crystal report.

Try

strFile = mP_strReportLocation & strReportFileNm & ".rpt"

mP_strReportFileName = strReportFileNm

If IsNothing(mP_ObjCrystalReport) = True Then

mP_ObjCrystalReport = New ReportDocument

End If

mP_ObjCrystalReport.Load(strFile)

''Code Added By STS as on 23-Feb-2007============================

If strReportFileNm <> "rpt_loc_stk01500" And strReportFileNm <> "rpt_loc_SPL00700" Then

mP_ObjCrystalReport.Refresh()

End If

''Code Ends Here==================================================

intCounter = mP_ObjCrystalReport.DataDefinition.ParameterFields.Count 'Check if there are parameters or not in report.

'As parameter fields collection also picks the selection formula which is not the parametermeter, so if total parameter count is 1 then we check whether, its a parameter or selection formula.

If intCounter = 1 Then

If InStr(mP_ObjCrystalReport.DataDefinition.ParameterFields(0).ParameterFieldName, ".", CompareMethod.Text) > 0 Then

intCounter = 0

End If

End If

Apart from this, I am trying to use backgroundworker class to resolve this issue. If you have any idea about that then please help me out. Take it as urgent.
 
Thanks in advance.
Shalabh
shalabh kamboj
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 24 Apr 2007 at 6:50am
How long it takes a report to load is a function of how long the report takes to process data - it has almost nothing to do with the code in your application.  The report won't appear until the data has been processed and the first page rendered. 
 
Have you checked the things that I listed above?  Those are going to make a big difference in how fast the report processes.
 
The other thing is that the first time you load a report from your application, it will take a while because all of the Crystal assemblies have to load into memory.  For example, I have an application that loads a report and does some processing and then loads another for processing.  It always takes about 3-4 times as long to load the first report as it does to load the second because the assemblies are already in memory when the second one is loaded.  There is not much you can do to change this.
 
-Dell
IP IP Logged
Shalabh
Newbie
Newbie
Avatar

Joined: 18 Apr 2007
Location: India
Online Status: Offline
Posts: 4
Quote Shalabh Replybullet Posted: 24 Apr 2007 at 10:39pm
Well, I have checked all the options you told me to do, they are already ok. the report takes around 1-2 minutes to load, it hardly matters whether the report is of 1 page or 500 pages.
if I shift to CR XI, then these issues will be resolved.
Can you please tell me what are the new features of CR XI and why it is good to use CR XI as compare to CR10.
 
shalabh kamboj
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 25 Apr 2007 at 6:25am
Go to http://www.businessobjects.com/products/reporting/crystalreports/editions.asp
and download the .pdf file that contains the Feature Comparison by Version and Edition.
 
-Dell
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.015 seconds.