?
Solved

Parameters <> Main report

Posted on 2014-02-11
5
Medium Priority
?
414 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
  • 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

839 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