Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Main report records to display if Subreport has data

Status
Not open for further replies.

Lubna05

Technical User
Nov 2, 2010
1
US
Hi,

I'm new to this forum, but I think this is the best place to ask. I have a main report that displays contact info, then linked to a sub report which calculates the total amount someone has contributed and prompt for a date range.

The report works fine, but I would like the main report to list records only if the there is a record in the subreport.

Any suggestions? or am I going about the report setup all wrong?

Thanks!
 
It sounds like you could reverse the set up and use the contributions as the main report with a link to the contact info, but it depends upon whether there are likely to be multiple contributions per contact. If you have a contact ID in the contributions table, you could group by that in the main report and use the sub for the contact info.

Otherwise, you could suppress the main report info by placing the subreport in a section above the one containing the main report info, e.g., in GH_a with the main report info in GH_b. You could then use a shared variable created in the subreport to suppress the main report GH_b section. If you formatted GH_a to underlay following sections, it would display in alignment with the main report info, while still allowing suppression when appropriate. You would need to add a reset formula in the report header and in the group footer so that the shared variable would have a default value that could be used for the suppression when the subreport was empty.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top