I have the following filter expression on a dataset.
Under the Filter tab on the dataset
Expression:
=iif(CStr(Parameters!Bill_ID.Value) <> "All",
CStr(Fields!Bill_ID.Value) = CStr(Parameters!Bill_ID.Value),True)
Operator:
=
Value:
True
My report parameter Bill_ID is String datatype.
My field value Bill_ID from my dataset is a varchar(15).
Yet, when I preview the report with a legitmate parameter value I
receieve this error message.
"The processing of filter expression for "data set" cannot be
performed. The comparison failed. Please check the data type returned
by the filter expression.
How can I get this to work. I spent hours trying different
combinations. What am I doing wrong!! Please respond.Add "=" in front of the True to make it a boolean instead of a string
literal:
=True
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Mossman" <tmosson1@.sbcglobal.net> wrote in message
news:1107572335.620117.23360@.o13g2000cwo.googlegroups.com...
> I have the following filter expression on a dataset.
> Under the Filter tab on the dataset
> Expression:
> =iif(CStr(Parameters!Bill_ID.Value) <> "All",
> CStr(Fields!Bill_ID.Value) = CStr(Parameters!Bill_ID.Value),True)
> Operator:
> => Value:
> True
> My report parameter Bill_ID is String datatype.
> My field value Bill_ID from my dataset is a varchar(15).
> Yet, when I preview the report with a legitmate parameter value I
> receieve this error message.
> "The processing of filter expression for "data set" cannot be
> performed. The comparison failed. Please check the data type returned
> by the filter expression.
> How can I get this to work. I spent hours trying different
> combinations. What am I doing wrong!! Please respond.
>|||Thank you Rob very much. I was going crazy trying to figure this out
on Friday.sql
Showing posts with label expression. Show all posts
Showing posts with label expression. Show all posts
Friday, March 23, 2012
Monday, February 27, 2012
Help me with Derived Column Transformation
I have this expression
(Registered_Units == Limited_Units) ? 0 : (Painted_Units / (Registered_Units - Limited_Units)) * 100)
(Registered_Units == Limited_Units) ? 0 : (Painted_Units / (Registered_Units - Limited_Units)) * 100)
It gives me 0.00, although those 3 columns have values.
if I cast it like this
(Registered_Units == Limited_Units) ? 0 : ((((DT_DECIMAL,2)Painted_Units) / ((DT_DECIMAL,2) (Registered_Units - Limited_Units))) * 100)
It gives me correct answer in whole number but .00 after decimal.
Any clue how to fix it ?
Try casting the 100 to a decimal as well...
Dave Fackler
|||Hi Dave,Thankyou for your reply.
I have changed the expression to following and it works
(Registered_Units == Limited_Units) ? 0 : ((DT_DECIMAL,2)((DT_DECIMAL,2)((Painted_Units * 100)) / ((DT_DECIMAL,2)(Registered_Units - Limited_Units))))
I appreciate your response.
Labels:
column,
database,
derived,
expression,
limited_units,
microsoft,
mysql,
oracle,
painted_units,
registered_units,
server,
sql,
transformation
Subscribe to:
Posts (Atom)