Solved

Use sub report parameter field in part of the subreport linking

Posted on 2004-09-13
14
1,267 Views
Last Modified: 2011-10-03
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
Comment
Question by:dba123
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
  • 2
  • +2
14 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 12046811
>>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
 
LVL 1

Author Comment

by:dba123
ID: 12047626
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
 
LVL 101

Expert Comment

by:mlmcc
ID: 12047833
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
On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

 
LVL 1

Author Comment

by:dba123
ID: 12047850
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
 
LVL 10

Expert Comment

by:ebolek
ID: 12047854
? parameter is the one internally created by the crystal report to link to the subreport parameter

Regards
Emre
0
 
LVL 28

Expert Comment

by:bdreed35
ID: 12047857
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
 
LVL 28

Expert Comment

by:bdreed35
ID: 12047865
I may have misunderstood your post, disregard if I misunderstood.
0
 
LVL 1

Author Comment

by:dba123
ID: 12048013
>>>? 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
 
LVL 10

Expert Comment

by:ebolek
ID: 12048182
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
 
LVL 1

Author Comment

by:dba123
ID: 12048251
>>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
 
LVL 1

Author Comment

by:dba123
ID: 12048309
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
 
LVL 1

Author Comment

by:dba123
ID: 12049118
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
 
LVL 13

Accepted Solution

by:
vidru earned 500 total points
ID: 12050427
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
 
LVL 10

Expert Comment

by:ebolek
ID: 12054248
thanks dave.:)

Regards
Emre
0

Featured Post

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question