?
Solved

Parameters <> Main report

Posted on 2014-02-11
5
Medium Priority
?
410 Views
Last Modified: 2014-02-11
Hello experts,

I am having a problem where the Master Report has a Parameter where no data is returned from a sub report... The Master Report itself does not pick up data (which there is none), but data should come up in the subreport...How do I script this... The subreport link is this
 {Command.Job} = {?Pm-Command.Job}.

Thank you in advance
0
Comment
Question by:Mikeyman_01
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 26

Expert Comment

by:Kurt Reinhardt
ID: 39850957
If there's no data in the main report then there's nothing to link the subreport to.  Basically, the subreport isn't receiving a parameter, so it's returning nothing.  That's how it works.
0
 

Author Comment

by:Mikeyman_01
ID: 39851016
I realize that the Master has no data...but wasnt sure if there was some formula that might work
0
 
LVL 26

Expert Comment

by:Kurt Reinhardt
ID: 39851165
There's not.  The only way to get around this would be to remove the link and use the subreport as a standalone, but this would mean you'd have to either manually input a job parameter or code the subreport to pull data based on business rules.
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 2000 total points
ID: 39851277
Does the main report have a Job parameter?
If so you could link to the subreport on it rather than the field the report has.

mlmcc
0
 
LVL 26

Expert Comment

by:Kurt Reinhardt
ID: 39852120
I would only support this as a solution if the parameter is built into the command itself, not outside of it in Crystal Reports?  Why?  Because a parameter built outside of the command won't be passed to the database for processing.  As a matter of best practices for efficiency and optimization, the parameter needs to be inside the command.

So, while this may "work" (like a lot of things you can do in Crystal Reports), whether you "should" do it comes with caveats.

I also question report design where there's no data for the command in the main report, but data is expected in a subreport.  For linked subreports, the purpose of the linked sub is that it's a subset of data related to the main.  Think header data for the main and detail data for the sub.  Generally speaking, I would only expect to see data in subs with no data in the main for dashboard style reports where there's no actual data source in the main report.  The exception would be if there was a data source in the main where the sole purpose of it was to generate  a dynamic list of values that were to be passed into the subreport(s).

For the sake of others who may search for similar issues, I'd personally like to see more detail for the report design and why the solution worked for it.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question