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

Parameter Field isn't in 'Select Expert' in subreport, in all others

Status
Not open for further replies.

Drakhan

Technical User
Jun 3, 2002
67
US
I hope I can get can again call on your alls wisdom and experience...

I have a parameter field named "RepName" which I use to bring up a drop down list of sales reps. This selection criteria allows the user of the report to narrow down the report to that one rep (duh!). Anyway, I have 4 subreports, 3 of which were created during the original report creation. Recently I was asked for to place a new subreport into this report...everything works fine, execpt for one thing...it shows all the data of all the reps...so to narrow down the selection, like I did in the previous 3 subreports, I added the SALESREP field from the database, and used 'Select Expert' to make it equal to {?RepName}, however {?RepName} is not listed in the drop down!

I double checked the other 3 subreports and the parameter field {?RepName} is set equal to SALESREP in the 'Select Expert'. When I tried to manually enter {?RepName} in the 'Select Expert' for SALEREP, I receive the following warning message:

This field name is not known

The parameter field of {?RepName} is located in the report header of the main report and passes to the previously made subreports...how do I get this work with the new subreport?

 
In main report, right click on the new subreport and select "change subreport links" option. Then select the parameter field from main report you want to use in subreport(Fields to link). In the lower part of popup, there will be "Select Data in subreport based on field" option, check that and select "SALEREP" field.
Also you can verify this in "Edit Selection Formula-> Record"

-manisha
 
Dear Drakhan,

Right Click Subreport.

Edit Subreport.

Add parameter to your subreport with the exact same name and settings as one in the main report.

Save.

Go back to design,

Choose Change Subreport Links.

I am assuming you are linking on Salesrep, change this to the parameter field for SalesRep.

In the drop down box, make sure your parameter is selected.

Save.

Check to make sure that the select expert of the subreport is now correc (sometimes you have to modify and select the parameter you created).

Hope this helps,

ro Rosemary Lieberman
rosemary@microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.
 
You have to have a parameter field in the subreport before you can link it and use it. CR will create one for you when you create the link, but I prefer to create my own in the subreport. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top