Solved

Parameters <> Main report

Posted on 2014-02-11
5
396 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 100

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now