Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Subreport Linking using parameters Post Reply Post New Topic
Author Message
halifaxman
Newbie
Newbie


Joined: 20 Mar 2007
Online Status: Offline
Posts: 1
Quote halifaxman Replybullet Topic: Subreport Linking using parameters
    Posted: 28 Mar 2007 at 5:43am
Hi,
 
I have used a SQL command in my main report, which uses parameters as below
 
where rg.resourcegroupid ={?team} AND c.startdatetime >= cast({?start} as datetime) AND c.startdatetime < cast({?end} +1 as datetime)
 
I have 4 further subreports linked to the main report, they all use the same paramaters as above.
 
As individual reports they all run in seconds, but when I link them by the parameters below, the report inevitably takes 20 minutes plus to run or sometimes times out.
 
{?team}
{?start}
{?end}
 
Any ideas on how to make the report run quicker?
 
Thanks
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 28 Mar 2007 at 10:11am
There are various performance issues that you might need addressed. Subreports are resource hog because they have to be processed multiple times. If you put them in the detail section then this can really slow down a report. You can make them On-Demand so that they are only processed when you open them. It's also bad to show "total number of pages' anywhere on your report b/c it has to process the whole report prior to showing the first page. Otherwise it could process it page by page as you view it and this speeds things up quite a bit.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
sandy
Groupie
Groupie


Joined: 10 Jan 2007
Location: United States
Online Status: Offline
Posts: 45
Quote sandy Replybullet Posted: 18 Jul 2007 at 9:21am

I have a main report that has parameters for username and start date.  I also have 3 subreports which use the same parameter.  I am confused about the subreport linking as when I run the main report I am prompted for username and start date for each of the subreports. 

 
Any assistance would be greatly appreciated as I am a newbie too.
 
IP IP Logged
rnareshk
Newbie
Newbie
Avatar

Joined: 19 Jul 2007
Location: India
Online Status: Offline
Posts: 30
Quote rnareshk Replybullet Posted: 19 Jul 2007 at 5:21am
may be parameter linking between main report and sub report is done properly.
Thank You,
Naresh.
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 19 Jul 2007 at 11:28am
This is a very common error because the solution, quite frankly, doesn't make a lot of sense. Nonetheless, here is what you need to to:

The problem is that when you link the two reports, CR by default creates a new parameter for the subreport to link to (in the bottom left hand corner). Most people use this "suggested" parameter and then in the bottom right hand corner they list the parameter they created. This won't work. You need to ignore the suggested parameter and in the bottom left cornet specify the parameter that you created. That will prevent the double prompting.

Edited by BrianBischof - 19 Jul 2007 at 11:29am
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
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.016 seconds.