Skip to Content

Crystal Report print null date as 30/12/1899

Hello to all, I have developed a report with Crystal Report for Visual Studio (2017). The data source of my report is a SqlServer table that contains some columns of data type (non-datetime, date only). When the date column contains the NULL value, the report prints me 12/30/1899!

I want you to print me an empty string.

Where am I wrong ???

Thank you very much.

Beppe

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Apr 26 at 09:00 AM

    Hi Giuseppe,

    I've seen this behavior with SQL Server, however, for me even SQL Server Management Studio prints 1899!

    CR does not transform NULL to a default date value. Could you please run a simple query in the database and search for rows with year = 1899.

    If you still wish to suppress such values, right-click the field > Format Field > common tab > Click the formula button beside suppress and use this code:

    Year({Date field}) = 1899

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 26 at 12:03 PM

    Hi Abhilash,

    it works perfectly!

    Thank you very much.

    Beppe

    Add comment
    10|10000 characters needed characters exceeded