Solved

Parameters <> Main report

Posted on 2014-02-11
5
408 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 500 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

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…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
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.

707 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