Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Help with FilterExpression in BIDS 2005 - I'm going crazy


Help with FilterExpression in BIDS 2005 - I'm going crazy

Author
Message
SQLFan-933088
SQLFan-933088
Grasshopper
Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)

Group: General Forum Members
Points: 12 Visits: 180
Hi all,

I hope someone can help. I'm about to pull my hair out. Something as simple as a filter expression in BIDS 2005 is not working.

All I want to do is show results where two numbers divided together are >= .01. I'm getting a "failed to evaluate filter expression" error.

The two numbers from the dataset are from a Stored Proc, where the columns are [money] datatype.

-- First I tried this in the Filter Expression (on a table):
Expression: =(Fields!Collected.Value/Fields!Discounted.Value)

Operator: >=

Value: =.01

When I do it this way, I get the message "Cannot compare date of types System.Decimal and System.Double.

-- So, I changed it to this, in an attempt to force the datatypes to be the same:

Expression: =(CDec(Fields!Collected.Value)/CDec(Fields!Discounted.Value))

Operator: >=

Value: =CDec(.01)

Now I get the error "Failed to evaluate FilterExpression."

This is driving me insane. I'm trying to keep the number of stored procedures (SP) down to a minimum. The same SP is used for other reports which need the same data presented a bit differently in the report definition. All I want to do is filter the results shown. I don't want to create yet another SP to maintain just to get around a crazy, practically unusable filter setting in BIDS. (sorry - just so frustrated right now)

Can anyone help please?? Thanks!!
davoscollective
davoscollective
SSChasing Mays
SSChasing Mays (610 reputation)SSChasing Mays (610 reputation)SSChasing Mays (610 reputation)SSChasing Mays (610 reputation)SSChasing Mays (610 reputation)SSChasing Mays (610 reputation)SSChasing Mays (610 reputation)SSChasing Mays (610 reputation)

Group: General Forum Members
Points: 610 Visits: 1000
How about
Expression: =CDec(Fields!Collected.Value/Fields!Discounted.Value)

Value: =0.01


I suspect that dividing two decimals is giving you a float datatype, so convert them to decimal after the division.
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