Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
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: Thursday, February 19, 2015 12:54 PM
Points: 430, Visits: 43
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
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 5:12 PM
Points: 1,116, Visits: 6,799
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