September 12, 2011 at 7:14 am
Good morning,
I have created a calculated field that I want to add to my report. What I am trying to do is return a field called AVGREV if it falls between 2 dates which will be passed in as parameters. What I intend to do is SUM the field AVGREV in the report. Please see the expression below. Still real new to this stuff and getting frustrated. Thanks in advance.
=IIF(Fields!CSTRDT.Value >= FORMAT(Parameters!Parameter1.Value, "yyyyMMdd") AND Fields!CSTRDT.Value <= FORMAT(Parameters!Parameter2.Value, "yyyyMMdd"),(Fields!AVGREV.Value),0)
September 12, 2011 at 7:16 am
In the Dataset, get the column as a real datetime column. Then you won't have to waste time with that convert cr@p.
The convert should be done only once in SSRS and only for display purpuses. Exactly for the problem you are experiencing.
September 12, 2011 at 7:23 am
OK, did that, Thanks. Now I am getting the following error.
contains an error: Operator '>=' is not defined for type 'Decimal' and type 'Date'.
September 12, 2011 at 7:29 am
mbrady5 (9/12/2011)
OK, did that, Thanks. Now I am getting the following error.contains an error: Operator '>=' is not defined for type 'Decimal' and type 'Date'.
Hit google with this one. I can't remember but I know I have found that answer there.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply