1
votes

I' ve got a problem with printing a report in Crystal Reports. The data to the report is taken from PostgreSQL database. Crystal Reports is using by C# .net 4.0 Windows Forms Application. I put on report field which is DateTime field - in the database that fields is null(mostly) . But if I print report the crystal reports put instead null values current date which is not correct, because that date is the time when the contract with customer is finished. The null value meaning that is not finished. How could I get on reports: if field is null, field have to be blank?

Thanks for any help

1
But I don't know where the crystal reports replace null values with current date. When I put a formula field it takes current date - no null value - BKl
Please verify the date value from database/table. Are they really nulls or they have some default value. Also open the CrystalReport Designer (.rpt) + Select date field + select object format. - kv-prajapati
You have right - in database i've got value '-infinity'. I'm using a NHibernate to operate on data and when I save a new item, the nhibernate put that value where it is not assigned. I have to solve this problem. Thank for help - it wasn't fault a crystal. - BKl
For any people who got the same problem. To solve my problem with NHibernate you must allow null values for DateTime. It's easy - you must declare field like : DateTime? date; - BKl
Please post your solution as an answer. - kv-prajapati

1 Answers

1
votes

You have right - in database i've got value '-infinity'. I'm using a NHibernate to operate on data and when I save a new item, the nhibernate put that value where it is not assigned. I have to solve this problem. Thank for help - it wasn't fault a crystal

For any people who got the same problem. To solve my problem with NHibernate you must allow null values for DateTime. It's easy - you must declare field like : DateTime? date;