Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

Report Builder 3.0 and an expression for a parameter Expand / Collapse
Posted Thursday, August 7, 2014 11:27 AM



Group: General Forum Members
Last Login: Monday, September 26, 2016 4:43 PM
Points: 477, Visits: 58
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).
Post #1600788
Posted Thursday, August 7, 2014 9:46 PM


Group: General Forum Members
Last Login: Today @ 8:30 PM
Points: 2,134, Visits: 12,261
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.
Post #1601009
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse