Focal Point
Solved: Date representation in french in report Painter heading

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

January 29, 2010, 03:56 PM
Marikaki
Solved: Date representation in french in report Painter heading
Hi,

Does someone can resolve this date representation? Please see my efforts!

I want to show in the exl2k output report painter, the date representation in french as follow in a title(heading):

--> Janvier 2010

Below all errors I got with date manipulation:

 
1.
 -SET LEADZERO = ON;
 -SET &MTH       = 01292010 /1000000;
 -SET &MYY       = (1 * 10000) + 2010 + X;    where 1 is &MTH and X is there to stuck the report

2.
 -SET &FFDATEMYY  = DATETRAN (&YYMD, '(MYY)', '(TR)', 'FR', 15, 'A15');
 output: "SEPTEMBRE @911 
RÉEL(R) 
ACTUEL"

3.
 -SET &DATECVT   = DATECVT (20100129, 'I8YYMD', 'MYY');
 -SET &TEST = 1309 + X;   where 1309 is &DATECVT and X is there to stuck the report

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


Marikaki

WF 7.7.03m, MRE, BI Dashboard, DevStudio, Report Caster, Windows 7, I.E. 8/9, Apache Tomcat 6.0, Derby Output formats: Excel2K, PDF, HTML, AHTML

January 29, 2010, 04:47 PM
njsden
quote:
I want to show in the exl2k output report painter, the date representation in french as follow in a title(heading):

--> Janvier 2010

Try this:

-SET &FFDATEMYY  = LCWORD2(15, DATETRAN (DATECVT(&YYMD, 'I8YYMD', 'MYY'),'(MYY)', '(tr)', 'FR', 15, 'A15'), 'A15');
-TYPE &FFDATEMYY


You should get:

Janvier 2010


Regards,
- Neftali.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
January 29, 2010, 04:58 PM
Marikaki
Thanks, Neftali but LCWORD2 is not found. Please see the error message.

  -SET &FFDATEMYY  = LCWORD2(15, DATETRAN (DATECVT(20100129, 'I8YYMD', 'MYY'),'(MYY)', '(tr)', 'FR', 15, 'A15'), 'A15');
 0 ERROR AT OR NEAR LINE      5  IN PROCEDURE mrheaderFOCEXEC *
 (FOC263) EXTERNAL FUNCTION OR LOAD MODULE NOT FOUND: LCWORD2
 


Marikaki


Marikaki

WF 7.7.03m, MRE, BI Dashboard, DevStudio, Report Caster, Windows 7, I.E. 8/9, Apache Tomcat 6.0, Derby Output formats: Excel2K, PDF, HTML, AHTML

January 29, 2010, 05:14 PM
njsden
Per documentation:

quote:
Available Languages : reporting, Maintain

The LCWORD2 function converts the letters in a character string to mixed-case by converting every alphanumeric character to lowercase except the first letter of each new word. LCWORD2 leaves any character after a single quotation mark as upper case, except that when there is at least one non-blank character before the quote and just one character followed by either the end of the string or a space immediately after the quote, the next letter is converted to lowercase For example, 'O’CONNOR' would be changed to 'O’Connor,' and JACK'S would be changed to Jack's.<-- This is irrelevant to your case


I am not able to determine why the function is not available in your environment but it is not that important anyway. I'm using it there to give you "Janvier" with initial uppercase since the
(tr)
parameter in DATETRAN returns the month as it is normally used in French (that is, lowercase).

Just stick to the basic date formatting:

-SET &FFDATEMYY  = DATETRAN (DATECVT(&YYMD, 'I8YYMD', 'MYY'),'(MYY)', '(tr)', 'FR', 15, 'A15');
-TYPE &FFDATEMYY
--> janvier 2010

And play a little bit with other functions (EDIT, UPCASE) in order to convert the first character into uppercase and that should do it.

Best,
- Neftali.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
January 29, 2010, 05:40 PM
Tom Flynn
quote:
-SET &FFDATEMYY = LCWORD(15, DATETRAN (DATECVT(&YYMD, 'I8YYMD', 'MYY'),'(MYY)', '(tr)', 'FR', 15, 'A15'), 'A15');
-TYPE &FFDATEMYY


LCWORD works fine...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
February 03, 2010, 04:47 PM
Marikaki
Hi everyone,

I'm not yet done with this issue because I did have to correct wrong data on my report prior to that and I am almost done. I supposed that tomorrow I will be able to continue with the french title. Thank you.

I apologize.


Marikaki

WF 7.7.03m, MRE, BI Dashboard, DevStudio, Report Caster, Windows 7, I.E. 8/9, Apache Tomcat 6.0, Derby Output formats: Excel2K, PDF, HTML, AHTML

February 04, 2010, 09:53 AM
Marikaki
I'm done with the french title. It works fine now. Thank you to everyone.

Is there a way to flag this event as closed?


Marikaki

WF 7.7.03m, MRE, BI Dashboard, DevStudio, Report Caster, Windows 7, I.E. 8/9, Apache Tomcat 6.0, Derby Output formats: Excel2K, PDF, HTML, AHTML

February 04, 2010, 10:10 AM
GamP
Yes there is.
Go back to your very first post in this thread, and edit it.
Then you'll be able to change the title and add [solved] or something like that to it.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
February 04, 2010, 10:29 AM
Marikaki
Solved.

I used the LCWORD combined with DATERAN AND DATECVT.

Thank you.


Marikaki

WF 7.7.03m, MRE, BI Dashboard, DevStudio, Report Caster, Windows 7, I.E. 8/9, Apache Tomcat 6.0, Derby Output formats: Excel2K, PDF, HTML, AHTML