Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: CrystalReportViewer Post Reply Post New Topic
Author Message
soujanyaj
Newbie
Newbie


Joined: 23 Jun 2009
Online Status: Offline
Posts: 7
Quote soujanyaj Replybullet Topic: CrystalReportViewer
     Posted: 23 Jun 2009 at 2:25am

I am having a problem in Crystal report Viewer.

The report is taking long time for displaying the data in CrystalReportViewer. If there are small number of records its taking 2 min to display. If there are about 3000+ records the CrystalReportViewer is getting hanged( a blank page is being displayed) and finally after 1hrs I am getting the error as page cannot be displayed.

 

For each main report record, the subreport is running. For e.g. if there are about 3000 records in the main report then the subreport calls the procedure for 3000 times. The crystal report is showing the data parallely for both main report and sub report, but in the ReportViewer is showing the report only after fetching all the data from main report and sub report. In crystal report the data is coming in 30 min for 3000 records.  We have opened the SQL profiler and seen the record tracing. After the main report’s query is executed, the procedure is being called in sub report and is getting executed for 3000 times, which is completed approx in 30 min. then the  report viewer is getting hanged and finally the “page cannot be displayed” error is coming.

 

I have increased the timeout settings in IIS and the application but still we are facing the same problem.(for each main reports record a subreport will be processed). I have searched a lot but could not get the answer.

 

I am having a main report which is built of querying the tables and one subreport which is calling a stored procedure. The subreport is in detail section. I am getting the results quickly in crystal report, but getting error in CrystalReportViewer for huge volumes of data. I am using SQL Server 2000 as database and Crystal report 10. We are connecting to the same database in both designer and the application. please help me this is an urgent issue.



Edited by soujanyaj - 23 Jun 2009 at 2:46am
Regards,
Soujanya
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 23 Jun 2009 at 6:15am
my standard response is to get rid of the subreport, you are probably making 3000 unnecessary trips to the database.  Instead make a 'super' row of data that combines the main report and the subreports data.  Since the subreport is in the details, the extra main report columns are just columns in the group header...unless I missed something.  Now there is only 1 hit to the database.  Also I would look into to optimizing the stored proc as ~1.5 seconds per selection seems like a long time....or there is alot of data to be returned for the subreport and the combination of 3000 trips and too much data is messing Crystal up.
 
Just make one really big selection and Crystal will probably be just fine.
 
HTH
IP IP Logged
soujanyaj
Newbie
Newbie


Joined: 23 Jun 2009
Online Status: Offline
Posts: 7
Quote soujanyaj Replybullet Posted: 23 Jun 2009 at 7:30am
Hi,
do you mean creating a single report with out using a sub report(calling the stored procedure in the main report it self....). how to make a 'super' row of data, combining the main report and subreport data. please advise.
Regards,
Soujanya
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 23 Jun 2009 at 8:27am
Crystal reads rows of data.  When it hits a subreport, it goes off and reads those rows of data, and then comes back and continues reading the data from the main report.  Since a subreport is usually linked to the main report based on values in the main report, you can create a 'super' row by combining the data yourself in a stored proc...an example:
 
originally you have table 1 with id and name and table 2 with id and charges.  You create a report where you list the name of the person and then call a subreport for the charges ( I know, this is very simple and there is no reason for the subreport, but that is the point...)
 
you could modify the Store proc to return id, name, charges in one table.  You would probably group by the report based on the name, you could put the name in the group header and then in the detail section all the charges. 
 
The reports look the same, but there is only 1 hit to the database the second way, while there are more the first way.  So a super row is just combining ALL of the data that you want to show into 1 datarow.  Let you DB software do what it is good at, gathering data, and let Crystal do what it is good at, formatting the data.
 
HTH


Edited by lockwelle - 23 Jun 2009 at 8:28am
IP IP Logged
soujanyaj
Newbie
Newbie


Joined: 23 Jun 2009
Online Status: Offline
Posts: 7
Quote soujanyaj Replybullet Posted: 30 Jun 2009 at 9:01am
Hi,
as u said i have changed the report.. created a single procedure and called it in the main report. Now I am able to run up to 6000 records from CrystalReportViewer. but if I run for 8000 records from report viewer, it finishes the procedure in 40 min and waits for 20 min after that I am getting the page cannot be dispalyed error. can you pls help me on this this is very urgent
Regards,
Soujanya
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 30 Jun 2009 at 10:05am

if you are getting the data via a stored proc, see how long it takes in SQL Server to just run the procedure.  6-8000 records is nothing.  do you still have subreports? It makes no sense that for that few of records it should take longer than a couple of minutes(and that is too long) for the report to format.

IP IP Logged
soujanyaj
Newbie
Newbie


Joined: 23 Jun 2009
Online Status: Offline
Posts: 7
Quote soujanyaj Replybullet Posted: 30 Jun 2009 at 10:57pm

the procedure finishes in 35 min in SQL SERVER.. I have removed all the subreports from the report. but still it is showing the page cannot be displayed error is coming.. pls help me in this...

Regards,
Soujanya
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 01 Jul 2009 at 6:09am
Sorry, I am stymied...how many records are we talking. ...wait you said around 8,000. Lots of columns?  I don't know if Crystal has a limit, but...
 
Have you thought of having an application call the report?  It could wait the 35-40 minutes and then pass the data to the report.  It might still fail, I think this one is beyond me.
IP IP Logged
DPorras
Newbie
Newbie
Avatar

Joined: 04 Aug 2009
Online Status: Offline
Posts: 1
Quote DPorras Replybullet Posted: 04 Aug 2009 at 4:28pm
Hello, talking about time, Im having a curious situation, when I include my PC to the local domain the report's aswer slow down, but when I work out of the domain works normally, do you have an idea of what could be the problem,
looking for help
IP IP Logged
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