Format Error

DBITGUY

New member
Local time
Today, 17:17
Joined
Jul 13, 2010
Messages
2
Data Conversion Error

I am very new developer and i'm having formatting issues with an expression. The expression below returns an error message "the Group expression returned a data type that is not valid". My problem is I'm not sure which conversion types to use. Can someone please help?

=(
IIF (Fields!VARIANCE.Value < 0 , (Fields!VARIANCE.Value ),
IIF (Fields!DISCOUNT_VARIANCE.Value < 0 , (Fields DISCOUNT_VARIANCE.Value),
IIF (Fields!TRUE_VARIANCE.Value < 0 , (Fields!TRUE_VARIANCE),(0)))))
 
Last edited:
Welcome to AWF

I would have thought the word "Variance" is a reserved keyword but it actually isn't.

What are you actually trying to do? Did you put that code in the CONTROL SOURCE of a textbox?
 
Yes sir. I've created a variance report that will show the variance totals of 2 different reports. Now I'm trying to group all negative variances and all positive variances and calculate the sum for each at the bottom of the report.
 
Try this:
Code:
=IIF(VARIANCE < 0 , VARIANCE, IIF(DISCOUNT_VARIANCE < 0 , DISCOUNT_VARIANCE, IIF(TRUE_VARIANCE < 0 , TRUE_VARIANCE, 0)))
 

Users who are viewing this thread

Back
Top Bottom