Message "Expression in Text property of 'Text1" can't be evaluated!"

Stimulsoft Reports.NET discussion
Post Reply
User avatar
Fabio Pagano
Posts: 355
Joined: Mon Apr 16, 2007 12:38 pm
Location: Bari (Italy)

Message "Expression in Text property of 'Text1" can't be evaluated!"

Post 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.
EDV Gradl
Posts: 228
Joined: Sat Jun 17, 2006 9:50 am
Location: Germany

Message "Expression in Text property of 'Text1" can't be evaluated!"

Post by EDV Gradl »

Couldn't you use a DateTime? field?

Marco
User avatar
Fabio Pagano
Posts: 355
Joined: Mon Apr 16, 2007 12:38 pm
Location: Bari (Italy)

Message "Expression in Text property of 'Text1" can't be evaluated!"

Post by Fabio Pagano »

It's already a datetime field.
EDV Gradl
Posts: 228
Joined: Sat Jun 17, 2006 9:50 am
Location: Germany

Message "Expression in Text property of 'Text1" can't be evaluated!"

Post by EDV Gradl »

Yes and what if you use a DateTime? (nullable) field?

Marco
raja
Posts: 12
Joined: Wed Aug 08, 2007 6:32 am

Message "Expression in Text property of 'Text1" can't be evaluated!"

Post 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").
User avatar
Fabio Pagano
Posts: 355
Joined: Mon Apr 16, 2007 12:38 pm
Location: Bari (Italy)

Message "Expression in Text property of 'Text1" can't be evaluated!"

Post 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)".
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Message "Expression in Text property of 'Text1" can't be evaluated!"

Post 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.
User avatar
Fabio Pagano
Posts: 355
Joined: Mon Apr 16, 2007 12:38 pm
Location: Bari (Italy)

Message "Expression in Text property of 'Text1" can't be evaluated!"

Post 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.
Brendan
Posts: 309
Joined: Sun Jul 16, 2006 12:42 pm
Location: Ireland

Message "Expression in Text property of 'Text1" can't be evaluated!"

Post 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
Post Reply