Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1271
  • Last Modified:

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.
0
dba123
Asked:
dba123
  • 6
  • 3
  • 2
  • +2
1 Solution
 
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
 
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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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
 
vidruCommented:
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
 
ebolekCommented:
thanks dave.:)

Regards
Emre
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 6
  • 3
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now