Condition on a date field

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

Condition on a date field

Post by Fabio Pagano »

In my records i have a field of "DateTime" type: i need to print it in red if its value is < today. In some records the date may be null.

I have tried to set a condition, but an exception is raised, probably caused by null dates.

Can you help me on how to print a datetime field in red if its value is < today?

Thank you.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Condition on a date field

Post by Alex K. »

Hello,

Can you please send us your report with test data for analysis.

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

Condition on a date field

Post by Fabio Pagano »

I try to explain without sending report and data.

Using version 2010.3.900.0 of 10 December 2010 in .NET Framework 2.0.

In my report i have a "datetime" column, called "Giro_Manutenzione_Automatica.Data_Ultima_Visita_Ispettiva", that i need to print in red if it is greater than "today" (or lesser than today, in my example i'm choosing "greater")

This datetime column may have null values in it.

In a text field i have put the following condition:

Image

If i run the report, i receive the following error:

"Object reference not set to an instance of object":

Image

with the following stack trace:

Image

May you help me?

If necessary, i'll send you report and data.

-- I suspect the problem is caused by null dates, though i haven't had the possibility to do a test on it.

Thank you.

Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Condition on a date field

Post by Alex K. »

Hello,

We couldn't reproduce this bug.
Please send us your report with test data for analysis.

Thank you.
Post Reply