Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Parameters <> Main report

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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
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 …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

636 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