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
Author
Message
Posted Thursday, August 7, 2014 11:27 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, August 7, 2014 4:34 PM
Points: 367, Visits: 38
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
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Today @ 8:49 PM
Points: 773, Visits: 4,971
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