Page 1 of 1
Message "Expression in Text property of 'Text1" can't be evaluated!"
Posted: Tue Dec 04, 2007 6:49 am
by Fabio Pagano
Using Vs2005, StimulReport version 2007.3.30.0 and C# as report language.
In a datetime dictionary field, if i pass a "null" value", in design preview i see the message "Expression in Text property of 'Text1" can't be evaluated!" (in the lower panel, where compiler messages appear).
Doesn't seem a critical message, but i need to know if there is a problem anyway.
Thanks.
Message "Expression in Text property of 'Text1" can't be evaluated!"
Posted: Tue Dec 04, 2007 7:13 am
by EDV Gradl
Couldn't you use a DateTime? field?
Marco
Message "Expression in Text property of 'Text1" can't be evaluated!"
Posted: Tue Dec 04, 2007 7:17 am
by Fabio Pagano
It's already a datetime field.
Message "Expression in Text property of 'Text1" can't be evaluated!"
Posted: Tue Dec 04, 2007 7:35 am
by EDV Gradl
Yes and what if you use a DateTime? (nullable) field?
Marco
Message "Expression in Text property of 'Text1" can't be evaluated!"
Posted: Tue Dec 04, 2007 7:37 am
by raja
Are you referring the database column using this format, DATASOURCE_NAME.COLUMN_NAME, if yes, then you should not use that (esp. for numeric and date columns), instead use the format, DATASOURCE_NAME("COLUMN_NAME").
Message "Expression in Text property of 'Text1" can't be evaluated!"
Posted: Tue Dec 04, 2007 7:41 am
by Fabio Pagano
EDV wrote:Yes and what if you use a DateTime? (nullable) field?
With "DateTime (nullable)" it works, but if the datasource comes from a datatable with a datetime field in it, it is automatically created in StimulReport as "DateTime", not "DateTime (nullable)".
Message "Expression in Text property of 'Text1" can't be evaluated!"
Posted: Tue Dec 04, 2007 4:21 pm
by Vital
Hello Fabio,
With "DateTime (nullable)" it works, but if the datasource comes from a datatable with a datetime field in it, it is automatically created in StimulReport as "DateTime", not "DateTime (nullable)".
Our report engine get data using standard Ado.Net. By default Ado.Net use DateTime type.
Thank you.
Message "Expression in Text property of 'Text1" can't be evaluated!"
Posted: Tue Dec 04, 2007 4:38 pm
by Fabio Pagano
Vital wrote:Our report engine get data using standard Ado.Net. By default Ado.Net use DateTime type.
Well, so why does the message "Expression in Text property of 'Text1" can't be evaluated!" appear when the value in a datetime field is null? How can i avoid it? (Note: it's not a critical message, only a warning that i see only in preview design).
Thanks.
Message "Expression in Text property of 'Text1" can't be evaluated!"
Posted: Tue Dec 04, 2007 5:36 pm
by Brendan
The reason it appears is because the report engine attempts to convert the field to a datetime and because the value is null it cannot conver the value, instead leaving the text component blank instead of containing Date text