Focal Point
[CLOSED] Date Format in Report Caster

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6767040176

June 06, 2014, 05:52 PM
Chris Mohr
[CLOSED] Date Format in Report Caster
I have a simple procedure that I'm using to test output formats in Report Caster:

TABLE FILE FA
SUM
FA.Position.MARKETVALUEBASE
BY LOWEST FA.Position.FULLDATE
BY LOWEST FA.Position.MFACTID
WHERE ( FA.Position.FULLDATE EQ '2/21/2014' );
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,
$
ENDSTYLE
END

FA.Position.FULLDATE is a DATE with usage MDYY (aka 06/06/2014).

When I create a schedule using EXL07 (Excel 2007/.xlsx), HTML, AHTML or PDF as the override format, the dates in the resulting document are formatted correctly: 06/06/2014.

When I create a schedule using XML, COMT (csv), TABT (tab-delimited), the dates in the resulting document do not have the slashes: 06062014.

Any thoughts as to why this happens, and what can be done about it to make it consistent?

Thanks,
Chris

This message has been edited. Last edited by: Chris Mohr,


WebFOCUS 8.0.0.6
Windows, All Outputs
June 09, 2014, 03:17 PM
susannah
it makes sense to me, as the first set are formatted final outputs and the second set are interim outputs.
so, what we do for different format requirements is
1) make a little fex that goes in the baseapp and gets -INCLUDE mod_wffmt.fex
where
mod_wffmt is:
-SET &cmt_HTML = IF &WFFMT.QUOTEDSTRING IS 'HTML' THEN ' ' ELSE '-*';
-SET &cmt_HTMLx = IF &WFFMT.QUOTEDSTRING NE 'HTML' THEN ' ' ELSE '-*';

... repeat for all the other formats you use
... and/or make some special ones, like
-SET &cmt_formatted = IF &WFFMT IS 'EXL2K' OR 'HTML' OR 'AHTML' OR 'PDF' THEN ' ' ELSE '-*';

... then create its reverse
-SET &cmt_formattedx = IF &WFFMT NE 'EXL2K' OR 'HTML' OR 'AHTML' OR 'PDF' THEN ' ' ELSE '-*';


2) then, in your fex
DEFINE FILE FA
temp/A8MDYY = DATECVT( FULLDATE , 'MDYY', 'A8MDYY');
TEXTDATE/A10=EDIT(temp,'99/99/9999');
END
TABLE FILE FA
...
&cmt_formatted.EVAL BY LOWEST FA.Position.FULLDATE
&cmt_formattedx.EVAL BY LOWEST TEXTDATE AS 'FULLDATE'





In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
June 12, 2014, 05:44 PM
Chris Mohr
Thanks for your response susannah. I understand how your method works, and while it works as advertised I wish there was a way to get directly to TEXTDATE without having to have two define fields for each date field that is part of the output.


WebFOCUS 8.0.0.6
Windows, All Outputs