MSSQL Reporting Services - Filtering data in a table

All;

I have an issue in tyring to place a filter on a table in my report.

I have one dataset that i want to filter and display serveral times in one report.  The query is complicated and somewhat slow(yes i am working on optimizing it), so i want to pull it once, and then use it in 4 different tables in my report.
The first table, will be unfiltered, the others will be filtered by one of the fields in my dataset that returns an int datatype, none of the values are null, I checked.

I tried following the instructions here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RShowto/htm/hrs_designer_v1_3diq.asp,
but it doesn't work.

My filter expression is =Fields!myField.Value>=80.

When i preview the report, it returns no build errors or warnings, but i get  this dialog:
------------------------------------------------------------------------------------------------
Processing Errors
An error has occurred during the report processing.
The processing of filter expression for the table 'table1' cannot be
performed.  The comparison failed. Please check the data type returned by the
filter expression.
-----------------------------------------------------------------------------------------------
What am i doing wrong???
This is driving me nuts...

Thank you;
LVL 1
cubical10Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

simon_kirkCommented:
Try this:

Expression: =Fields!myField.Value
Operator: >=
Value: =80

If it's still complaining about datatype mismatch, change the expression to:

=CInt(Fields!myField.Value)
0
cubical10Author Commented:
Thanks for the feed back.

What i had for my original post:
Expression:=Fields!myField.Value
Operator: >=
Value: 80

If I change the expression to Fields!myField.Value, without the leading =, the report runs without the error, but it does not filter.  
If I change the value to =80 from 80 i go back to the original error.  
Using CInt(Fields!myField.Value) does not error, but does not filter.  
=Cint(Fields!myField.Value) errors out.

BTW, i added CONVERT(int,myField) to my SQL statement just to make sure that i am returning an int field, no change...


0
simon_kirkCommented:
That's odd.  I tried setting a report very similar to yours and mine filters ok.  I even used the convert function in my SQL statement as well.

Filter I used:
Expression: =Fields!myField.Value
Operator: >=
Value: =80

Maybe you are getting a Null value for Fields!myField.Value in some of your records?  This could then be the mismatch that it's going on about.  You could find this out by adding a criteria against the field in the dataset to only select records where Fields!myField.Value is null ?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cubical10Author Commented:
OK;

I got it, picky app this is...
Expression: =CInt(Fields!myField.Value)
Operator: >=
Value: =80

Thanks...
0
simon_kirkCommented:
Got there eventually!  What some people deem as a 'learning-curve' :-)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
DB Reporting Tools

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.