Focal Point
FML Styling, Labels and skip line

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

October 15, 2012, 07:52 PM
sxschech
FML Styling, Labels and skip line
Hi,
I found this thread which has been most helpful in getting the layout and totaling using the FML approach provided by JG. http://forums.informationbuild...?r=25910169#25910169

I would like to find out the following are possible:


Here is the code
TABLE FILE CAR
SUM 
     SALES       AS 'Sales'       OVER 
     RETAIL_COST AS 'Retail Cost' OVER 
     DEALER_COST AS 'Dealer Cost' OVER 
     COMPUTE D2R_ratio/D12.2 = ( C3 / C2 ) * 100;
ACROSS SEATS RECOMPUTE 
FOR
     COUNTRY
'ENGLAND' AS 'England' LABEL R1 OVER 
'ITALY'   AS 'Italy'   LABEL R2 OVER 
'JAPAN'   AS 'Japan'   LABEL R3 OVER 
'ENGLAND' OR 'ITALY' OR 'JAPAN' AS 'Total' LABEL R4
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET FORMULTIPLE ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
-*ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
-*     INCLUDE = endeflt,
$
TYPE=REPORT,
     GRID=OFF,
$
TYPE=ACROSSVALUE,
     JUSTIFY=RIGHT,
$
TYPE=REPORT, SQUEEZE=OFF, FONT=TIMES, SIZE=9, 
$
     PAGESIZE='Letter',
     ORIENTATION=LANDSCAPE,
$
ENDSTYLE
END
 



WebFocus 7.7.03
Win7, all output
October 15, 2012, 08:19 PM
Francis Mariani
Here's an example with all your questions answered. One issue is the " AS 'Country'" adds a horizontal line which can be turned off with the ACROSSLINE SET command.

TABLE FILE CAR
SUM
SALES       AS 'Sales'       OVER
RETAIL_COST AS 'Retail Cost' OVER
DEALER_COST AS 'Dealer Cost' OVER
COMPUTE D2R_ratio/D12.2 = ( C3 / C2 ) * 100;
ACROSS SEATS AS '' RECOMPUTE AS 'Total'
FOR
COUNTRY AS 'Country'
'ENGLAND' AS 'England' LABEL R1 OVER
" " OVER
'ITALY'   AS 'Italy'   LABEL R2 OVER
" " OVER
'JAPAN'   AS 'Japan'   LABEL R3 OVER
" " OVER
'ENGLAND' OR 'ITALY' OR 'JAPAN' AS 'Total' LABEL R4

ON TABLE SET ACROSSLINE OFF
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET FORMULTIPLE ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
-*ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
-*     INCLUDE = endeflt,
$
TYPE=REPORT,
GRID=OFF,
$
TYPE=ACROSSVALUE,
JUSTIFY=RIGHT,
$
TYPE=REPORT, SQUEEZE=OFF, FONT=TIMES, SIZE=9,
$
PAGESIZE='Letter',
ORIENTATION=LANDSCAPE,
$
ENDSTYLE
END


Now back to my madness.


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
October 16, 2012, 01:39 PM
sxschech
Hi Francis,

Thank you so much that was very helpful. Here are my follow up questions, if I may...

Is it possible to have Country and Seats on the same line? This is how it shows.
        2     4      5
Country
------------------------------
England
  

Country       2     4      5
------------------------------
England
  


How do I adjust the spacing so that (hopefully) the report can fit on one page across based on revised code.

If a Country is going to be split between page 1 and page 2, how can I have the entire country print on page 2.

In my actual report, I was not able to get the word 'Total' to print, I think it is because I am using a NOPRINT on the line above, any workaround for this? The reason for the NOPRINT is to get the College name to be sorted a particular way rather than alphabetically. If I put the word 'Total' in the AS '', then the word 'Total' Appears over (On top of) the first college rather than at the actual col that is displaying the totals.
ACROSS COLLEGE_SORT NOPRINT RECOMPUTE
ACROSS COLLEGE  AS ''


To more closely resemble one of the reports, I have added another across to the file you modified to show BODYTYPE and SEATS. To get the total at the end, my current report only shows one overall Total. My actual report is by College and Gender, so the layout would be something like this:
                         ARTS          SCIENCES     TOTAL
Level   Status           M   F   T     M  F  T      M   F  T
------------------------------------------------------------
Fresh   Applied          3  2    5     1  1  2      4   3  7


The report as it currently looks (I would like to display the word 'Status' in the header above the word Applied)
                       ARTS             SCIENCES     
                 M   F    T     M      F       T         
Level
------------------------------------------------------------
Fresh   Applied  3   2    5     1      1       2         7


Here is the CAR example:
DEFINE FILE CAR ADD 
BODYTYPESORT/I2 = 
IF BODYTYPE EQ 'SEDAN' THEN 1 ELSE
IF BODYTYPE EQ 'COUPE' THEN 2 ELSE
IF BODYTYPE EQ 'ROADSTER' THEN 3 ELSE
IF BODYTYPE EQ 'HARDTOP' THEN 4 ELSE 9;
END
TABLE FILE CAR
SUM
     SALES       AS 'Sales'       OVER
     RETAIL_COST AS 'Retail Cost' OVER
     DEALER_COST AS 'Dealer Cost' OVER
     COMPUTE D2R_ratio/D12.2 = ( C3 / C2 ) * 100;
ACROSS BODYTYPESORT NOPRINT RECOMPUTE
ACROSS BODYTYPE AS ''
ACROSS SEATS AS '' RECOMPUTE AS 'Total'
FOR
     COUNTRY AS 'Country'      
'ENGLAND' AS 'England' LABEL R1 OVER " " OVER
'ITALY'   AS 'Italy'   LABEL R2 OVER " " OVER
'JAPAN'   AS 'Japan'   LABEL R3 OVER " " OVER
'ENGLAND' OR 'ITALY' OR 'JAPAN' AS 'Total' LABEL R4 OVER " " OVER
'W GERMANY' AS 'Germany' LABEL R5 OVER " " OVER
'FRANCE'  AS 'France'  LABEL R6 OVER " " OVER
'W GERMANY' OR 'FRANCE' AS 'Total' LABEL R7


-*ON TABLE SET ACROSSLINE OFF
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET FORMULTIPLE ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
-*ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
-*     INCLUDE = endeflt,
$
TYPE=REPORT,
     GRID=OFF,
$
TYPE=ACROSSVALUE,
     JUSTIFY=RIGHT,
$
TYPE=REPORT, SQUEEZE=OFF, FONT=TIMES, SIZE=9,
$
     PAGESIZE='Letter',
     ORIENTATION=LANDSCAPE,
$
ENDSTYLE
END



WebFocus 7.7.03
Win7, all output