Use sub report parameter field in part of the subreport linking

I have seen a report whereas the linking of the subreport is based on an ID field but also shows a parameter field in the linking dialog at the bottom.  This parameter field is a parameter field setup in the subreport.  But when I try to do the same for my report, here is what I do:

1) Right-click the subreport from the main report
2) Select "Change Subreport Links"
3) Move over the ID of the primary table that the main report is based off of
4) Try to tell the drop down at the bottom to use a parameter field I setup in the subreport

The problem is, I only get one value in the drop down for the parameter to use which is ?Pm-tablename.recordid

Where is the option to select that param I created in the subreport?  Also, the checkbox for "select data in subreport based on field"  is not checked...and I really don't understand why you would use that anyway.
LVL 1
dba123Asked:
Who is Participating?
 
vidruConnect With a Mentor Commented:
Ebolek was trying to find out if your problem is related to a known bug in CR 8.5.  The "Subreport parameter field to use" dropdown doesn't always drop down, in fact, it hardly ever drops down correctly.  You have to use the tiny little scrollbars on the right hand side of the combobox to get to any parameters other than the default "?Pm-" parameters that Crystal creates.

-dave
0
 
mlmccCommented:
>>the checkbox for "select data in subreport based on field"  is not checked...and I really don't understand why you would use that anyway.
This is used to help filter the data.

mlmcc
0
 
dba123Author Commented:
well, I gues this remains a mystery on how they were able to get the subreport parameter in there.  The report I was looking at used stored procedures..not that it has anytihng to do with the ability to see a defined parameter in the subreport but my report is not using sp
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

 
mlmccCommented:
I haven't read much on linking to a subreport but it may be tht you can only link to fields.  I have never tried to link to a parameter.  I'll check my reference materials.

mlmcc
0
 
dba123Author Commented:
Yea, I for sure see that in the drop down, it references a parameter that is actually in the subreport...the left dropdown at the bottom of the change subreport link properties
0
 
ebolekCommented:
? parameter is the one internally created by the crystal report to link to the subreport parameter

Regards
Emre
0
 
bdreed35Commented:
I have seen this same behavior at times.

Try this:

Follow your 4 steps above, but go ahead and pick the parameter ?Pm-tablename.recordid, and select the check box  for "select data in subreport based on field".
Go in and edit your subreport.
In the subreport design view, go to Report menu, Selection Formulas, Record.
In the editor, swap {?Pm-tablename.recordid} with your parameter field.
Go back and run the main report again and check your results.
0
 
bdreed35Commented:
I may have misunderstood your post, disregard if I misunderstood.
0
 
dba123Author Commented:
>>>? parameter is the one internally created by the crystal report to link to the subreport parameter

Ok, but back to my main quesiton, then how come all our reports don't use it?  They are using a parameter we created and I am able to drop that menu down and actually see it whereas in the report I created I can't?
0
 
ebolekCommented:
In the report you created you only see the parameter that you created that is true. It is only used to link the main &sub report to each other. Linking parameter different than the parameter that you created

If you scroll down the combo box you should be able to see the available parameter fields to link to
0
 
dba123Author Commented:
>>If you scroll down the combo box you should be able to see the available parameter fields to link to

And I don't that is the whole problem that I'm stating here.  I don't see the parameter I created.  The parameter that Crystal creeated for me is the only option in the drop down menu.  Am I missing something here?
0
 
dba123Author Commented:
If you are talking about the box that says "Available Fields"...it gives me the fields of the Main report, not the subreport and of course my parameter field is not in there in the list because it is a parameter field I created in my subreport, not my main report.
0
 
dba123Author Commented:
I have no idea how they got that in there.  I figured out that I had to put in the table in which the main report was based off into my subreport also..then I could set the linking properly based on the ID of both tables...the main report table and mysubreport table.
0
 
ebolekCommented:
thanks dave.:)

Regards
Emre
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.