Focal Point
FML Report - Column Headings

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

April 17, 2007, 05:18 PM
Jay
FML Report - Column Headings
I am trying to change the column heading in a FML report base on a define field - for some reason it does not recognize the define field.
THESE ARE MY DEFINES:

YR1_TITLE/A11 = IF 'SERVICEMONTH' EQ 'December' THEN (' ' | '&YR1') ELSE (PREVYR1A | ' - ' | CURYR1A );
YR2_TITLE/A11 = IF 'SERVICEMONTH' EQ 'December' THEN (' ' | '&YR2') ELSE (PREVYR2A | ' - ' | CURYR2A );
YR3_TITLE/A11 = IF 'SERVICEMONTH' EQ 'December' THEN (' ' | '&YR3') ELSE (PREVYR3A | ' - ' | CURYR3A );
END

TABLE FILE HLDXALL
SUM
COMPUTE SERVMONTH/Mtr = SERVICEMONTH; AS 'Service Month'
YR1_COUNT AS '&YR1_TITLE'

HERE YOU SEE I AM TRYING TO CHANGE THE HEADING VALUE WITH THE 'AS' BUT THE YR1_TITLE FIELD ACCORDING TO FOCUS DOES NOT EXIST

ANY SUGGESTIONS


WebFocus 7.6.6
Oracle 10
Windows XP
April 17, 2007, 06:09 PM
Alan B
Jay

You are intermixing dialogue manager and table the wrong way around.

A TABLE or DEFINE can utilise &variables, but you are creating a field in a DEFINE that you then refer to as an &variable.

Dialogue Manager is a control language with &variables and lines that begin with a '-'; &variables are constructed with a -SET only.

Now I am not sure how to achieve what you want here, with any ease, but your approach cannot work.

An approach may be to use the DEFINEd fields in a heading, positioning over each column, and use AS '' for the fields.

This message has been edited. Last edited by: Alan B,


Alan.
WF 7.705/8.007
May 16, 2007, 04:35 PM
Jay
Here is some of the code I used to create the column headings:
-IF &SELECTMONTH = 'December' GOTO ONEYEAR;
-SET &PREVYR1 = &YR1 - 1;
-SET &PREVYR2 = &YR2 - 1;
-SET &PREVYR3 = &YR3 - 1;
-SET &DASH = '-';
-SET &HEADYR1 = &PREVYR1 | &DASH | &YR1;
-SET &HEADYR2 = &PREVYR2 | &DASH | &YR2;
-SET &HEADYR3 = &PREVYR3 | &DASH | &YR3;
-GOTO REPORT
-ONEYEAR
-SET &HEADYR1 = &YR1;
-SET &HEADYR2 = &YR2;
-SET &HEADYR3 = &YR3;

Now in the report - this is the code:

TABLE FILE HLDXALL
SUM
YR1_COUNT/I10C AS '&HEADYR1'
YR2_COUNT/I10C AS '&HEADYR2'
COMPUTE PC21/P6.2% = ( ( YR2_COUNT - YR1_COUNT ) / YR1_COUNT ) * 100;
AS 'Percent Change'
YR3_COUNT/I10C AS '&HEADYR3'


Hope this helps somebody


WebFocus 7.6.6
Oracle 10
Windows XP
May 17, 2007, 09:15 AM
Francis Mariani
If this is truly a snippet of your code, then there doesn't appear to be anything wrong with it. Your original post stated that the DEFINE wasn't working. Alan B explained you were incorrectly mixing Dialogue Manager and WebFOCUS code.

What's wrong with the latest version of the code?

Are you getting an error message?


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server