INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Multiple parameter values descriptions in report header

Multiple parameter values descriptions in report header

(OP)
thread767-1698120: Multiple parameter values in report header

Hello, I have a report that allows for multiple parameter values (numeric) to be entered. I have the formula to display the id fields in the report header but can't figure out how to get the corresponding table lookup name field for each id entered. For instance, a user can enter 3 different departments (10,11,25) which links to department id. I would like to display in the header the name of each departments selected: 10-Hardware, 11-Plumbing, 25-Flooring. Any help would be appreciated. Thanks

RE: Multiple parameter values descriptions in report header

You say the dept. field is linked to department id. Is the department id another table? Does that table contain a description field with the name of the dept.? If so, you should be able to to put the description field in the report header. Now that I type that I think you want it in either the page header or a group header?

RE: Multiple parameter values descriptions in report header

Or not so clean, is to create a formula that looks the the department ID and returns the appropriate value (i.e., if {deparmentID} = 10 then "10-Hardward" else if {deparmentID} = 11 then "11-Plumbing", etc.). FYI: This is one possible solution.

RE: Multiple parameter values descriptions in report header

LaurieHamlin: I am trying to get it to show in the Report Header - not page and not group.
kray4660: There are too many potential departments for that solution to work. thanks

RE: Multiple parameter values descriptions in report header

So is there a linked table that has the descriptions? If so, then it should be easy to drop in a text box and the two fields with a hyphen in the middle. Otherwise I do not know of an easy solution.

RE: Multiple parameter values descriptions in report header

(OP)
There is a linked table. However when I added the field it doesn't go thru the array and give description for each ID. Unless I don't know the correct formula

RE: Multiple parameter values descriptions in report header

Okay I am assuming that the linked table is indeed linked in the Database Expert correctly. Thus if you put the ID (should not matter which table) and the description in a text box, I would think they would display correctly (are you filtering by department?). Not sure why you are talking about an array.

RE: Multiple parameter values descriptions in report header

I haven't tested this but the only way I can see to do this would be to create a sub report that contains the Department lookup table and displays the parameter selection they way you want it. Place the sub report in the report header and pass the parameter of the main report into it.

Hope this helps.

Cheers
Pete

RE: Multiple parameter values descriptions in report header

(OP)
Thanks Pete. Worked great~

RE: Multiple parameter values descriptions in report header

(OP)
kray4660: I mention arrays because that is how the multiple value parameter would be displayed in the report header. If you don't do an array, you will only see the first value instead on all of them.

RE: Multiple parameter values descriptions in report header

Duh, I know that. My brain was not thinking that way smile

RE: Multiple parameter values descriptions in report header

2
For other reading this post, CR 2016 has a special function now just for grabbing the descriptions from a parameter:
http://kenhamady.com/cru/archives/2736

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guides to Formulas, Parameters, Subreports, Cross-tabs, VB, Tips and Tricks
http://www.kenhamady.com/

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close