Date Format in Report

Discussion forum about all things Report Builder (all versions).
kjellv
Norway
Posts: 84
Joined: 05 Sep 2018, 07:12
Location: sandefjord/Norway

Date Format in Report

Post by kjellv » 04 Feb 2016, 10:48

hi

I run a report with a date field. When this field is BLANK / Null in the DataBase (SqlBase) the report show 24-11-4713 or something similar.

Why is this and how can I make the report show a BLANK when there is not date in the database?

User avatar
Charlie
Canada
Posts: 646
Joined: 07 Mar 2017, 18:52
Location: Fredericton, New Brunswick, Canada

Re: Date Format in Report

Post by Charlie » 04 Feb 2016, 12:28

What version of Team Developer are you using ?

kjellv
Norway
Posts: 84
Joined: 05 Sep 2018, 07:12
Location: sandefjord/Norway

Re: Date Format in Report

Post by kjellv » 04 Feb 2016, 17:24

TD 6.3 and Win 10

User avatar
Charlie
Canada
Posts: 646
Joined: 07 Mar 2017, 18:52
Location: Fredericton, New Brunswick, Canada

Re: Date Format in Report

Post by Charlie » 04 Feb 2016, 18:14

There isn't anything special that needs to be done to get a date field on a report to show blank when the date value in the database is null.

I think you will need to provide a sample app and sample report in the TD6.3 boards. The only way anybody can help you is to look at a sample query, app, and qrp that give the same problem as what you are getting with your specific query+app+qrp. (EDIT: Well, unless there is a known related bug with TD6.3)

(I use TD5.2, so I can't offer any help other than that.)

Jeff Luther
Site Admin
Site Admin
United States of America
Posts: 2370
Joined: 04 Mar 2017, 18:34
Location: Palm Springs, California

Re: Date Format in Report

Post by Jeff Luther » 05 Feb 2016, 19:11

One quick thing I would try would be to run the same query using SQLTalk and see what you get returned as the date. As Charlie wrote, if the Date column in the DB table is blank, then the return should be blank and so should the field's falue in your report.

When a query is made by your TD appl. for a report, the path for any value is:
(1) DB table DATE or DATETIME column value --> fetched into (2) the TD appl. Date/Time variable --> passed to RB as a (3) RB Date/Time Input Item --> (4) report field which is assigned the D/T Input Item.

It is a matter of debugging to see where in that path the error first appears:
(1) - Be sure the DATE column value is blank.
(2) - Debug with a breakpoint in the SAM_ReportFetchNext msg. and check that the D/T variable in your appl. is a blank after the SqlFetchNext() returns.
(3) - RB D/T input item is the correct D/T datatype, right? (I think it must be or else RB would throw a runtime error about 'incompatible datatypes' or similar).
(4) - Report field. Do you have a Formula for that field? Something like a year of '4713' tells me there is wildly wrong with the value. And there should be *no* value in the Input Item.

TRY THIS: Open your QRP in RB design-time, go into Preview Mode and check what that DATE field looks like. I just tried with a quick new QRP -- define an input item of type D/T, add a field and assign the Input Item to the field, go into Preview -- and what I see is what I expect: a U.S. formatted display of today's date, 2/5/2016 repeated for the entire first page in Preview mode.

The main date-type issue I recall with users back in my T/S days was with foreign, non-SQLBase DBs, where the default date format for a certain DB brand (Oracle, Sybase, etc.) is different than the default for SQLBase. But you wrote your DB backend is SQLBase so this should not be the issue. Let us know what you find when you debug the path as I describe above.
Jeff Luther @ PC Design
Palm Springs, California

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests