Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] How to pass date values in UK Date format to ReportCaster?
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] How to pass date values in UK Date format to ReportCaster?
 Login/Join
 
Silver Member
posted
Hi,

I have a report built using InfoAssist. The report is on a Portal however we want to schedule output using ReportCaster (as users are interested in receiving a scheduled output). The report has a date range as a parameter, however, when automated using the tool, we would like to cover a rolling date range of a month.

Unfortunately, the scheduled report (using ReportCaster), the start date value of "DATEADD ( '&YYMD.EVAL' , 'D' , -30 )" and the end date value of "DATEADD ( '&YYMD.EVAL' , 'D' , -1 )" are throwing runtime errors

 
(FOC177) INVALID DATE CONSTANT: 43637
(FOC282) RESULT OF EXPRESSION IS NOT COMPATIBLE WITH THE FORMAT OF FIELD: Dfn_RangeStartDate_DMYY
(FOC177) INVALID DATE CONSTANT: 43666
(FOC282) RESULT OF EXPRESSION IS NOT COMPATIBLE WITH THE FORMAT OF FIELD: Dfn_RangeEndDate_DMYY
(FOC177) INVALID DATE CONSTANT: 43637
(FOC177) INVALID DATE CONSTANT: 43666
(FOC177) INVALID DATE CONSTANT: 43637
(FOC177) INVALID DATE CONSTANT: 43666


I have struggled to find out a solution for the above problem.

Any ideas will be hugely appreciated.

Kind regards,

Manoj.

This message has been edited. Last edited by: Manoj,


Newbie.
WebFOCUS 8.2.0.3.
Client 8.2.0.4.
 
Posts: 46 | Location: UK | Registered: August 30, 2018Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Manoj

This is just a guess but based on the field name Dfn_RangeStartDate_DMYY I think you are using the wrong variable in your DATEADD try using &DMYY


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2013 | Location: Customer Support | Registered: April 12, 2005Reply With QuoteReport This Post
Virtuoso
posted Hide Post
quote:
Originally posted by Manoj:
... "DATEADD ( '&YYMD.EVAL' , 'D' , -30 )"

(FOC177) INVALID DATE CONSTANT: 43637

Your problem is that DATEADD returns a integer and not a date and your WHERE clause seems to look for a date.

YYMD, DMYY, ... should normally not cause issue when performing WHERE clauses; they are display format
But in case, try with the following:
DATETRAN(DTADD('&YYMD.EVAL', DAY, -30), '(DMYY)', '(/)', 'EN', 10, 'A10')

DATETRAN(DTADD('&YYMD.EVAL', DAY,  -1), '(DMYY)', '(/)', 'EN', 10, 'A10')


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2370 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Silver Member
posted Hide Post
Many thanks, Chuck and Martin.

Martin, your solution is working without any issues. It should give me a different content (data) tomorrow which I shall confirm tomorrow. Meanwhile, thanks.

Kind regards,

Manoj.


Newbie.
WebFOCUS 8.2.0.3.
Client 8.2.0.4.
 
Posts: 46 | Location: UK | Registered: August 30, 2018Reply With QuoteReport This Post
Silver Member
posted Hide Post
Hi Martin,
I have re-tested the report this morning. Output files are generated without any error and with the expected data.
Thank you very much.
Kind regards,
Manoj.


Newbie.
WebFOCUS 8.2.0.3.
Client 8.2.0.4.
 
Posts: 46 | Location: UK | Registered: August 30, 2018Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] How to pass date values in UK Date format to ReportCaster?

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.