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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subreport linking problem

Status
Not open for further replies.

furlman41

MIS
Sep 25, 2002
18
US
I have a subreport called "ASSET" within my report, which links to the main report through a parameter (ClientID).

So, for each time that ClientID(client table) = ClientID(asset table), the information is displayed.

Now, I also have a liability table. In the asset table I have a field called "ID" and in the liability table I have a field called "AssetID".

What I am trying to do is, while my subreport is printing, if there are any "AssetID" = "ID" then I want to print a note in the subreport... "Note: there is a liability associated with this asset."

However if there are 2 liabilities associated with the asset.. then the ASSET gets repeated 2 times, which I don't want to happen.

How can I set the linking up so this will work? Any suggestions?
 
It sounds like your subreport has both the asset table and liability table in it. Is that correct? If so:

In the subreport, group on the asset ID field and place all of the items in the details section in the group footer. Then hide the details section and group header. For your note you could 1) create a DistinctCount summary on the AssetID field (and hide the display) and 2) create a formula using "If" logic to show the note if the DistinctCount Summary > 1. (I'm assuming you're using a left join to the liablility table...otherwise you won't get back any assets that don't have matching liabilities).
" BI hope that helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top