I have a TextBox that is calculating the difference in days between two dates.
Value: =IIF(Fields.originalshipdate>Fields.revisedshipdate, DateToInt(Fields.originalshipdate), DateToInt(Fields.revisedshipdate)) - DateToInt(now())
Format: {0:0}
This is returning an integer, in the range of -10 to 20, generally.
I am trying to use Conditional Formatting on this TextBox to Color the background based on the Value.
I've tried several different approaches without success.
----------------------------------------------------------
=ReportItem.Value < =0
Returns:
An error has occured while processing TextBox 'Alert':
Cannot perform '<' operation on System.String and System.Int32.
----------------------------------------------------------
=CInt(ReportItem.Value) < =0
An error has occured while processing TextBox 'Alert':
An error has occured while executing function CInt(). Check InnerException for further information.
------------- InnerException -------------
Exception has been thrown by the target of an invocation.
------------- InnerException -------------
Input string was not in a correct format.
----------------------------------------------------------
=ReportItem.Value < 0
Fires on all rows, regardless of Value.
----------------------------------------------------------
Your help on this matter is appreciated.
Steve
Value: =IIF(Fields.originalshipdate>Fields.revisedshipdate, DateToInt(Fields.originalshipdate), DateToInt(Fields.revisedshipdate)) - DateToInt(now())
Format: {0:0}
public
class
OECReport : Telerik.Reporting.Report
{
public
static
int
DateToInt(DateTime date)
{
return
date.Subtract(
new
DateTime(1899, 12, 31)).Days;
}
}
This is returning an integer, in the range of -10 to 20, generally.
I am trying to use Conditional Formatting on this TextBox to Color the background based on the Value.
I've tried several different approaches without success.
----------------------------------------------------------
=ReportItem.Value < =0
Returns:
An error has occured while processing TextBox 'Alert':
Cannot perform '<' operation on System.String and System.Int32.
----------------------------------------------------------
=CInt(ReportItem.Value) < =0
An error has occured while processing TextBox 'Alert':
An error has occured while executing function CInt(). Check InnerException for further information.
------------- InnerException -------------
Exception has been thrown by the target of an invocation.
------------- InnerException -------------
Input string was not in a correct format.
----------------------------------------------------------
=ReportItem.Value < 0
Fires on all rows, regardless of Value.
----------------------------------------------------------
Your help on this matter is appreciated.
Steve