Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: separate Parameter for Subreport Post Reply Post New Topic
Author Message
Jeyaganesh
Newbie
Newbie


Joined: 09 May 2011
Online Status: Offline
Posts: 2
Quote Jeyaganesh Replybullet Topic: separate Parameter for Subreport
     Posted: 09 May 2011 at 7:09pm
Hi,
 
    I am using a crystal report 10. In my report i am displaying current information in main report and historical information in subreport. i am also suppressing some data in main report.
 
      only one parameter is passed (employee).one of the situation is like this " When there is one record in main report and two records in subreport, i want to suppress the one record in main report but the records in subreport is also getting suppressed.
 
      Is there a way to pass parameter in a single shot to both the main report and subreport.
 
       
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 11 May 2011 at 3:23am
it is probably that your subreport is called from the detail section of report, and you are suppressing the detail section if there is only 1 record...so it is supressing the subreport.
 
If you want the subreport to display, regardless of the main report being suppressed, I would create a new section in the details, and place the subreport there, then even if you have suppressed the 'original' detail section, the subreport will run.
 
If this doesn't layout in the report as desired, I would suppress the individual objects in the section, instead of the entire section, then the subreport will still run, but the information that is not desired will be suppessed.
 
As for assigning the links from the main report to a subreport, no, not that I am aware of, you need to set them for each subreport.  CR gives the flexibility to have multiple subreports, and there is no requirement that the parameter list name in a subreport has to match the main report, even if it the same field. You have the freedom to choose your naming convention on a report by report by subreport basis.
 
HTH
IP IP Logged
Jeyaganesh
Newbie
Newbie


Joined: 09 May 2011
Online Status: Offline
Posts: 2
Quote Jeyaganesh Replybullet Posted: 12 May 2011 at 2:08am
Thanks lockewelle. I tried suppressing individual objects but still still facing the same issues.
 
     I have the main report objects and subreport placed in group footer2 and group footer 1 respectively.
 
What i believe is if there is one record diaplayed in main report (Current information) and i need to suppress then the parameter (Employee) passed from the main report to subreport becomes null or no value there by not executing the subreport.
 
  Help me if still i am missing anything.


Edited by Jeyaganesh - 12 May 2011 at 2:08am
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 12 May 2011 at 3:05am
sounds like things are set up correctly.  To help trouble shoot, I would place the linking values for the subreport in the same section, or add another section, and see what you get. 
 
I have often found, when things aren't working, it's because what I thought the data was....wasn't.
 
HTH
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