×
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!
  • Students Click Here

*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.

Students Click Here

Jobs

Parameter Field range value issue

Parameter Field range value issue

Parameter Field range value issue

(OP)
Hi, I am using CR XI and a OLEDB connection. I want to use a Parameter Field allowing multiple, discrete and range values. Now I am facing a small issue with the range:
  • If I select the range: Rows 1-9 from an offer request - I get rows 1-16 (all rows)
  • If I select the range: Rows 1-10 from an offer request - I get rows 1 and 10
  • If I select the range: Rows 1-3 from an offer request - I get rows 1-3 and 10-16 (all rows)

  • ...and so on. However, adding values 1, 3, 6, 7 works.
The database field is a string value and therefore I need to have the Parameter type: string
The report does fetch the row numbers via the database field and I have added the same Value field to the Parameter.

Hope there is an easy fix for this :)

RE: Parameter Field range value issue

The simplest solution would be to use a number parameter and change your selection formula to:

Val({table.row}) in {?ParameterRange}

Better yet, do a conversion of the row field to a number in the SQL expression editor, and then use that in your selection formula for more report speed.

-LB

RE: Parameter Field range value issue

(OP)
Thanks for your quick answer. I am a self-taught beginner and haven't used the SQL expression editor or conversions. What I did try and surprisingly works:
1. Changed the Parameter to Number
2. Added 'Val({table.row}) in {?ParameterRange}' to the formula field
-> This changed the type to Boolean and gives True/False values in the report and does fetch the correct rows, if I set in the Select expert to "is True.".
3. Hid the formula field and added the row numbers from database fields to view the numbers instead of True values
-> Now I get the correct values with the range and/or multiple values

If this is completely wrong and needs to be changed, please let me know!

RE: Parameter Field range value issue

This is okay—you just added in another step. I meant for you to add:

Val({table.row}) in {?ParameterRange}

...to report->selection formulas->record.

-LB

RE: Parameter Field range value issue

(OP)
Ok, thank you for the help! I could not figure this out without your advice.

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!

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