SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Report Builder 3.0 and an expression for a parameter


Report Builder 3.0 and an expression for a parameter

Author
Message
Kevin Ray
Kevin Ray
SSC-Addicted
SSC-Addicted (498 reputation)SSC-Addicted (498 reputation)SSC-Addicted (498 reputation)SSC-Addicted (498 reputation)SSC-Addicted (498 reputation)SSC-Addicted (498 reputation)SSC-Addicted (498 reputation)SSC-Addicted (498 reputation)

Group: General Forum Members
Points: 498 Visits: 66
I am not sure if this is the right place to post this, but here goes.

I am working on a report using Report Builder 3.0 and I have a parameter that filters by TenderCode. The issue is for one of the possible parameter values (Money Order) they have managed to have four different codes in the database (MO, MnOrdr, MOrdr, and MOrde). So when some selects Money Order, is there an expression I can create in the Report Parameter Properties that will filter properly (I have tried a few things, but so far nothing has worked).
pietlinden
pietlinden
SSChampion
SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)

Group: General Forum Members
Points: 13482 Visits: 14097
Ideally, you would have someone fix the dirty data for you, and your problems would go away. But if that's not an option, you could create a calculated field in your report. Say we call it "TransactionType"

=Switch(Fields!TransType.Value = "MO","Money Order",
Fields!TransType.Value = "MnOrdr","Money Order",
Fields!TransType.Value = "MOrdr","Money Order",
Fields!TransType.Value = "MOrde","Money Order")



Then all of the funky spellings will map to the same value. Then you would just use this expression ("TransactionType") instead of the original value.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search