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

Parameter value to subreport - only one value returned need multiple 1

Status
Not open for further replies.

FrankTWall

Technical User
Jun 29, 2005
20
AU
Crystal XI
SQL database

Have a main report with grouping on a formula , say
Fibre
DSL
Internet
etc
there are 3 groups below this level but probably irrelevent for this question

I want to have a sub report (at each group level) that selects the ID's from the data in the main report (at group level) and passes the ID's from the main report and then selects those records in the subreport based on the contract ID.

The same principal would then be applied to each subsequent group e.g. Internet has 2 groups , I need just the contract ID's being passed to the subreport to give me detail on those contracts

What I am getting is the subreport only returning the FIRST value (contract ID)NOT passing all the values to the subreport. I have tried manipulating the record selection in the sub report to be "in" rather than "=" etc. I am still not having success.

Any ideas would be most appreciated.
 
Try linking the subreport to the main report by the ID.

This would mean that the subreport will have to exist at the unique ID level, which means either grouping the main report by the ID, or having the subreport in the Details if that's a level they are unique to.

You might forego using a subreport entirely and use an Add Command (CR 9 or above) with an embedded correlated subquery.

Hard to know since you didn't post what you intend once you have them.

-k
 
Thanks very much for your suggestion Synapsevampire , redrew the synapse in my brain and saw the light you created. Fixed and thanks

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top