Page 1 of 1
Date field with null value ==> 30-12-1899 on report print
Posted: Thu 23 Jul 2009 12:21
by mariusz
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
Posted: Fri 24 Jul 2009 13:01
by Challenger
We will add this option in the next build of IBDAC.
Posted: Tue 15 Sep 2009 11:42
by mariusz
As I see, new release is ready. I can not find earlier described future. Can you help me to find it?
Posted: Thu 17 Sep 2009 09:55
by Plash
Sorry, this feature is not included in the last build.
We'll add it in the next IBDAC build.
Posted: Fri 18 Sep 2009 09:53
by mariusz
Please... my customers has some calls by day with a question "what the hell is it?". In effect - me too!
Posted: Mon 21 Sep 2009 09:31
by Plash
Does your database realy contain NULL or 30-12-1899 values?
Posted: Tue 22 Sep 2009 12:38
by rfwoolf
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;
Posted: Wed 23 Sep 2009 21:16
by mariusz
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.
Posted: Fri 25 Sep 2009 08:57
by Plash
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.
Posted: Sun 11 Oct 2009 10:49
by mariusz
I have sent the sample to your e-mail address.
regards
M
Posted: Wed 14 Oct 2009 09:04
by mariusz
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.
Re: Date field with null value ==> 30-12-1899 on report print
Posted: Wed 20 Apr 2016 04:33
by Karthika
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.