| Author |
Message |
QuikeyMan
Newbie
Joined: 20 May 2011
Online Status: Offline
Posts: 5
|

Topic: Slow Report/Quick In SQL Server QA Posted: 20 May 2011 at 10:06am |
|
To start off, this pertains to Crystal Reports for Best version 8.5, but I could not find a forum specific to this software. I have a report that takes quite a long time for users to run, ~12.5 sec. If I run the query manually in SQL Server Query Analyzer, SS Profiler shows that both queries use the same amount of CPU and make the same number of reads, but when run in SS QA, the query take ~0.6 sec. to complete. If I pull up the report in CR and fill it with live data, SS Profiler shows that the query takes ~6.7 sec. to complete. What slows the query down that much in Crystal Reports? I am not very knowledgeable on the mechanics of CR, so any help would be appreciated.
Edited by QuikeyMan - 20 May 2011 at 10:07am
|
IP Logged |
|
|
|
Emir_W
Senior Member
Joined: 25 Apr 2010
Online Status: Offline
Posts: 228
|

Posted: 21 May 2011 at 10:45pm |
|
i just share my experience maybe it will help.
from CR point of view: 1. possible the link between each table in CR (this is if you using direct table) 2. using too much conditions and/or variable 3. using picture with big file size (need to reduce the filesize of the pict)
other than that I have no idea. hope someone else can help.
Just share my experience.
|
|
Emir W
|
IP Logged |
|
QuikeyMan
Newbie
Joined: 20 May 2011
Online Status: Offline
Posts: 5
|

Posted: 23 May 2011 at 5:31am |
|
I appreciate the response, and though I could see a couple of those thoughts slowing down the overall time to generate the report, I do not understand why it would slow down the date retrieval. Does anyone have knowledge of that sort of thing? Can CR slow down data retrieval?
|
IP Logged |
|
QuikeyMan
Newbie
Joined: 20 May 2011
Online Status: Offline
Posts: 5
|

Posted: 31 May 2011 at 10:02am |
|
Another aspect of the report in question that I do not understand is why the query returns a result set as opposed to a specific row of data. The report in question pulls information for an invoice, but instead of just querying for data that pertains to the invoice in question, and entire result set (~2,000 rows) is returned. To me, this seems like unneeded overhead, but I do not know enough about the mechanics of CR to make that conclusion.
|
IP Logged |
|
Emir_W
Senior Member
Joined: 25 Apr 2010
Online Status: Offline
Posts: 228
|

Posted: 31 May 2011 at 8:03pm |
|
CR is to display report based on: - direct link between tables depends on how we link between each table (join, left join, right join, etc.) - views - stored procedures and usually these can be done from DB.
what to display is based on conditions that we apply for the report. it can be from: - SQL (passing parameters), or - CR it self --> parameters --> conditions a. on each sections (PgHd, Details, GrpHd, GrpFt, PgFt) b. on some variables --> pictures (size of the pics)
you can check the performance of the CR from (assume you using CR XI) by clicking on 'Report' - 'Performance Timing'.
from here you can see the 'Average to to format a page' and others.
hope it help.
|
|
Emir W
|
IP Logged |
|
QuikeyMan
Newbie
Joined: 20 May 2011
Online Status: Offline
Posts: 5
|

Posted: 01 Jun 2011 at 2:40am |
|
I understand what CR reports is for and how it works in a generic sense. What I do not understand is why you would want to return a results set to a report, as opposed to a parametrized query returning a single row in this case. To me, I would think a database engine would be more efficient then letting CR sort through a result set. And no, I am not using CR XI, I am using Crystal Reports for Best v8.5. Thanks for the reply nonetheless.
|
IP Logged |
|
Robotacha
Groupie
Joined: 11 Nov 2009
Location: United Kingdom
Online Status: Offline
Posts: 97
|

Posted: 14 Jul 2011 at 1:24am |
Was just browsing the forums and saw this post.
Just a quick tip on this:
If you go to PAGE SETUP, and checkmark the NO PRINTER option,
Your report will run slightly quicker. (as it doesnt need to optimize the data for printing)
I never believed it at first, but it does actually work.
|
|
Regards,
Michael Jones
|
IP Logged |
|
|
|