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

Problem linking subreport to main report pm values

Status
Not open for further replies.

psamedy

Technical User
Apr 22, 2002
60
US
Hello all,

My datasourse is an XML Http URL, i'm running v10. I have 4 subreports in the details section of one main report.

DETAILS A - SUBREPORT1
DETAILS B - SUBREPORT2
DETAILS C - SUBREPORT3
DETAILS D - SUBREPORT4

The main report takes two parameter values, ID1 and ID2. To prevent having Crystal prompt forthe same parameters for each subrepot i'd like to link each subreport to parameters ID1 and ID2.

For each subreport I i've used submenu option CHANGE SUBREPORT LINKS. From the AVAILABLE FIELDS BOXi've added both parameter fields to the FIELDS TO LINK box, ?ID1 and ?ID2.

For each subreport in the SELECT DATA IN SUBREPORT BASED ON FIELD i've chosen @ID1(formula containing value of field ID1) as the field to be use with my main report.

With the exception of SUBREPORT1, my problem is that although I have created an @ID2 in each subreport it is not available to choose from the SELECT DATA IN SUBREPORT BASED.

Thanks for your help in advance, Pat
 
I'm not sure if this is what you've done, but anyway-
The parameters aren't created automatically in the subreports. You need to create them (in the usual way, in the subreport) and link the ones in the main report to the ones you have created. Ignore the ones it looks like Crystal has created - they are just there to confuse (as far as I can tell). Apologies if this isn't what's happened, but I was confused by this for a LONG time!
 
Go into each subreport and place the ID2 field onto the report (in a hidden area). Then when you go back to your container report and "edit subreport links" - the ID2 field will be available for selection.

Weird isn't it? This happened to me recently, and that's how I fixed it.
 
Sorry - I have just reread your post more carefully!
 
How are you using @ID1 and @ID2 in the subreports?

How is it used in your SELECT EXPERT?

I have a similar report with 26 subreports doing the sdame thing but I deleted the subreport parameters and linked the main report parameters directly to the table.field of my subreport.

{table.datefield} in [{Pm?DateFrom} to {Pm?DateTo}]

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top