Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 951
  • Last Modified:

Crystal Reports sub report link

I have a sub report that has fewer records than the main, is it possible to change the link so it returns null but still shows the main report data
(Like a right join in a query)
0
HKFuey
Asked:
HKFuey
3 Solutions
 
Ido MilletProfessor of MIS at Penn State Erie and Owner, Millet SoftwareCommented:
Please clarify. Perhaps provide a concrete example of the data you need to show and how you are currently linking the subreport to the main report.
0
 
HKFueyAuthor Commented:
OK, for example: -
The Main report is a Customer Statement
The sub report links to a table with customer email addresses

The link between the 2 is CustomerCode, but this may not always exist in the sub report data.

My question is: if the sub report has no data will data still show on the main report?
0
 
Ido MilletProfessor of MIS at Penn State Erie and Owner, Millet SoftwareCommented:
Yes, the subreport link is not like a database join.  It can't restrict records in the main report.
0
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.

 
mlmccCommented:
You can format the subreport so it doesn't display if there are no records.

Right click the subreport
]Click FORMAT SUBREPORT
On the last tab there is a check box to SUPPRESS BLANK SUBREPORT

mlmcc
0
 
James0628Commented:
Just to add a bit to what the others said ...

 You could say that a subreport is _kind_ of like an Outer Join, in that it won't restrict the results in the main report, but that's because there really is no connection at all between the queries in the main report and subreports.  When you use "Change Subreport Links", you're not actually "joining" the main report and subreport queries in any way.  All that you're really doing is passing values to parameters in the subreport, and then the subreport can do whatever with those values, but that will have no effect on the data that's included in the main report.

 James
0
 
HKFueyAuthor Commented:
Thanks for the help, I am clearer now!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

Tackle projects and never again get stuck behind a technical roadblock.
Join Now