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)
HKFueyAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Ido MilletConnect With a Mentor Professor 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
 
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
Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

 
mlmccConnect With a Mentor Commented:
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
 
James0628Connect With a Mentor Commented:
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
All Courses

From novice to tech pro — start learning today.