Date field with null value ==> 30-12-1899 on report print

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
mariusz
Posts: 62
Joined: Wed 16 Jul 2008 21:04
Location: Poland / Poznan
Contact:

Date field with null value ==> 30-12-1899 on report print

Post by mariusz » Thu 23 Jul 2009 12:21

I'm using IBDAC 3.0.0.4 on D7 width QuickReport from delphi pack.

I have table with date field. If record has null value in this date field, on report printed I have 30-12-1899.

In MySQL DAC forum is similar topic
http://www.devart.com/forums/viewtopic.php?t=9591

What can I do width this. This is a problem for me.
Can you implement described futere in the IBDAC?

regards
Mariusz

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Fri 24 Jul 2009 13:01

We will add this option in the next build of IBDAC.

mariusz
Posts: 62
Joined: Wed 16 Jul 2008 21:04
Location: Poland / Poznan
Contact:

Post by mariusz » Tue 15 Sep 2009 11:42

As I see, new release is ready. I can not find earlier described future. Can you help me to find it?

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Thu 17 Sep 2009 09:55

Sorry, this feature is not included in the last build.
We'll add it in the next IBDAC build.

mariusz
Posts: 62
Joined: Wed 16 Jul 2008 21:04
Location: Poland / Poznan
Contact:

Post by mariusz » Fri 18 Sep 2009 09:53

Please... my customers has some calls by day with a question "what the hell is it?". In effect - me too!

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Mon 21 Sep 2009 09:31

Does your database realy contain NULL or 30-12-1899 values?

rfwoolf
Posts: 35
Joined: Thu 27 Aug 2009 19:39

Post by rfwoolf » Tue 22 Sep 2009 12:38

This is a dataset problem. Are you familiar with persistent fields and calculated fields?
For example if your field is called MyDate
You create a calculated field called CalcMyDate of fieldtype Date.
Then in your dataset's onCalc event, you say:
begin
Fieldbyname('CalcMyDate').value := Fieldbyname('MyDate').value;
if Fieldbyname('MyDate').isnull then fieldbyname('CalcMyDate').clear;
end;

Now, if that doesn't work, you go and make CalcMyDate a calculated field of type string. This way you always give it a string, such as ''
Then this is your OnCalc event:
begin
Fieldbyname('CalcMyDate').AsString := Fieldbyname('MyDate').AsString;
if Fieldbyname('MyDate').isnull then fieldbyname('CalcMyDate').AsString = '';
end;

mariusz
Posts: 62
Joined: Wed 16 Jul 2008 21:04
Location: Poland / Poznan
Contact:

Post by mariusz » Wed 23 Sep 2009 21:16

Plash wrote:Does your database realy contain NULL or 30-12-1899 values?
Yes, I'am a 100% sure. My database contain NULL values. I have no records with 30-12-1899 date value.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Fri 25 Sep 2009 08:57

We could not reproduce the problem. Please send to support*devart*com a complete small sample that demonstrates the problem, including the script for creating database objects.

mariusz
Posts: 62
Joined: Wed 16 Jul 2008 21:04
Location: Poland / Poznan
Contact:

Post by mariusz » Sun 11 Oct 2009 10:49

I have sent the sample to your e-mail address.

regards
M

mariusz
Posts: 62
Joined: Wed 16 Jul 2008 21:04
Location: Poland / Poznan
Contact:

Post by mariusz » Wed 14 Oct 2009 09:04

I'm after e-mail discussion with your support team, and I see, that the problem is realy not related with IBDAC. (for example, dbExpress behavior is same).
My problem has occured, when QRDBText components has the mask properties set. Emptying this properties field "solve" my problem. Same situation occur with FastReport (without mask properties, FastReport represent null's as zero's).

Maybe, the problem realy is with dataset. I don't know.

best regards
M.

Karthika
Posts: 1
Joined: Tue 19 Apr 2016 13:10

Re: Date field with null value ==> 30-12-1899 on report print

Post by Karthika » Wed 20 Apr 2016 04:33

You can do one thing.... If the issue with Fast report means, do the following steps.

1. Right click on the field (Date Field)
2. Hide Zero's - Unchecked this property.

Now you run the fast report. It will work fine.
Please try the same and update your comments.

Post Reply