Solved

Use sub report parameter field in part of the subreport linking

Posted on 2004-09-13
14
1,261 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
  • 6
  • 3
  • 2
  • +2
14 Comments
 
LVL 100

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 100

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
 
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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now