Link to home
Start Free TrialLog in
Avatar of teogos
teogosFlag for United States of America

asked on

Show Value on Textbox rdcl report

I have a textbox on report that , is getting value from this expression
=Fields!COUNT.Value-Fields!MANUAL.Value
I want this values to be visible only if they are greater than 1  or greater than -1
how can I do this?
Avatar of IrogSinta
IrogSinta
Flag of United States of America image

only if they are greater than 1  or greater than -1
I'm a bit confused by this statement. The numbers, -.5, 0, .7, and 1 are all greater than -1


=IIf((Fields!COUNT.Value-Fields!MANUAL.Value)>-1,(Fields!COUNT.Value-Fields!MANUAL.Value),"")

Open in new window

Avatar of teogos

ASKER

This what I get with the expression you gave me, I put this expression on the properties visible expression


An error has occurred during report processing.
The Hidden expression used in textbox ‘textbox14’ returned a data type that is not valid.
Avatar of teogos

ASKER

Sorry about the confusion on the first statement,  Basically I want to show the values on this textbox14   if the result is Greater than 1 and any other values that are negative but
values that are minus only if they are -2,  -3, -4   etc..
So I guess you mean numbers less than -1 or greater than 1, right?  

As for the error, can you tell me what you get when you have it as
=Fields!COUNT.Value-Fields!MANUAL.Value
and also when you have it as
=""
Avatar of teogos

ASKER

If both values are the the same then it shows 0.0
What I meant was if you get any errors when you tried those expressions. Did you get an error when you tried ="" inside the textbox?
Does your textbox have any formatting being applied to it?
Avatar of teogos

ASKER

yes, I format applied to the textbox  just  N
I did got the error with the sample just as you put it on the expression
Remove the format and try the first expression I gave you.
Avatar of teogos

ASKER

when the Properties visible expression is set to =""   also gave me the error
Avatar of teogos

ASKER

OK, with not format   and using the expression
=IIf((Fields!COUNT.Value-Fields!MANUAL.Value)>-1,(Fields!COUNT.Value-Fields!MANUAL.Value),"")

still shows the error
Avatar of teogos

ASKER

The Hidden expression used in textbox ‘textbox14’ returned a data type that is not valid
Just as a test, try this:
=IIf((Fields!COUNT.Value-Fields!MANUAL.Value)>-1,(Fields!COUNT.Value-Fields!MANUAL.Value),9)
Avatar of teogos

ASKER

SAME ERROR
But if you put
=Fields!COUNT.Value-Fields!MANUAL.Value
you don't get an error?
Avatar of teogos

ASKER

No, it gaves me  plus value or minus value whatever is the case
Tell me what you get for each of these:
=9
=IIf(1+1=2, 2, 0)
Avatar of teogos

ASKER

Same error on both expressions
Avatar of teogos

ASKER

Are understanding each other, I put the expressions on the Hidden expression is this where you want me to tried?
How about this:
="9"
Avatar of teogos

ASKER

NO DIFFERENCE
Okay, thanks for clarifying that.  That clears it up quite a bit.  I was actually talking about putting it in the expression of the textbox itself.  But forget all that.

In the Hidden property, put this:
=IIf((Fields!COUNT.Value-Fields!MANUAL.Value)<-1 OR Fields!COUNT.Value-Fields!MANUAL.Value)>1,(Fields!COUNT.Value-Fields!MANUAL.Value),TRUE, FALSE)

Open in new window

Avatar of teogos

ASKER

looks like is the wrong sintax
Avatar of teogos

ASKER

it says wrong arguments
ASKER CERTIFIED SOLUTION
Avatar of IrogSinta
IrogSinta
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of teogos

ASKER

Well does not gave me the error, but if the difference is 0   still shows the zero, and that is what I do not want, so if the difference between this numbers is greater than 1 or something like -1 or -2 then show the value
Avatar of teogos

ASKER

I reverse the TRUE and FALSE, looks better, but let me gave it more test
Avatar of teogos

ASKER

yep. that will do it, thanks  for you time an help, using the same expression, can I hide or make visible the whole row on the report base  on this expression?