Focal Point
[SOLVED] ACROSS TITLE

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

October 13, 2015, 09:05 AM
Srinivasan.Munuswamy
[SOLVED] ACROSS TITLE
Hi In the below code I would like to get the title of "Model" as well. Below code is written with the aim to suppress the blank line between across data and BY column title. Need help to achieve this. Expected Output format is in excel.
SET ACROSSTITLE = SIDE
TABLE FILE CAR
SUM 
     DEALER_COST
BY MODEL AS ''
BY BODYTYPE AS ''
ACROSS COUNTRY NOPRINT
ACROSS CAR NOPRINT
ACROSS COUNTRY AS ' '
ACROSS CAR AS 'bodytype'
-*ON TABLE PCHOLD FORMAT XLSX
ON TABLE NOTOTAL
ON TABLE SET STYLE *

$
TYPE=REPORT,
     FONT='VERDANA',
     SIZE=9,
$

ENDSTYLE
END   

This message has been edited. Last edited by: <Kathryn Henning>,


Webfocus 8005, UNIX, PPT, HTML,EXL2K,EXL07, PDF. Oracle 11i
October 13, 2015, 01:25 PM
GavinL
Truthfully, they way your putting BodyType in, is not the title for body type, it's for the ACROSS column CAR.. So your attempting to fake it, which isn't available this way. The only way to put a title on the columns your looking for is to do this. I know your creating a blank row, but the other way, your labeling something that is incorrect.

SET ACROSSTITLE = SIDE
TABLE FILE CAR
SUM 
     DEALER_COST
BY MODEL AS 'Model'
BY BODYTYPE AS 'Body Type'
ACROSS COUNTRY NOPRINT
ACROSS CAR NOPRINT
ACROSS COUNTRY AS 'Country:'
ACROSS CAR AS 'Car:'
-*ON TABLE PCHOLD FORMAT XLSX
ON TABLE NOTOTAL
ON TABLE SET STYLE *
$
TYPE=REPORT,
     FONT='VERDANA',
     SIZE=9,
$
ENDSTYLE
END




- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
October 14, 2015, 02:18 AM
Srinivasan.Munuswamy
Hi Gavin,
Thank you for the reply.

As you understood clearly, I am trying to fake it, with the whole intention of suppressing blank row. Is there any way we can achieve titles without blank row.


Webfocus 8005, UNIX, PPT, HTML,EXL2K,EXL07, PDF. Oracle 11i
October 14, 2015, 06:31 AM
Tony A
Of course there's a way, you just need to think outside of the box.

Think, not how do I force the titles, but more can I replace the titles with my own heading -
TABLE FILE CAR
 BY COUNTRY  
 BY CAR
 ON TABLE HOLD AS TITLES      
END
-RUN
-SET &Title1 = ' <+0>';
-SET &Title2 = 'Model<+0>Body Type';
-REPEAT :Loop &LINES TIMES;
-READFILE TITLES
-SET &Title1 = &Title1 || (' <+0>'|&COUNTRY);
-SET &Title2 = &Title2 || (' <+0>'|&CAR);
-:Loop
TABLE FILE CAR
SUM DEALER_COST AS ''
 BY MODEL       AS ''
 BY BODYTYPE    AS ''
ACROSS COUNTRY  NOPRINT
ACROSS CAR      NOPRINT
HEADING
"&Title1.EVAL"
"&Title2.EVAL"
ON TABLE PCHOLD FORMAT XLSX
ON TABLE NOTOTAL
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
include=endeflt,$
TYPE=REPORT, FONT='VERDANA', SIZE=9, HEADALIGN=BODY, WRAP=OFF, $
TYPE=HEADING, SIZE=9, JUSTIFY=LEFT, $
TYPE=REPORT, COLUMN=DEALER_COST, WIDTH=.8, WRAP=.8, $
ENDSTYLE
END

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
October 14, 2015, 06:43 AM
Tony A
Forgot to mention that the advantage here is that this should function in any of the standard output formats of html, pdf or excel.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
October 14, 2015, 08:04 AM
GavinL
Nice.. I was thinking that something like that that might work, but don't have the time to see if that would.



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
October 15, 2015, 02:49 AM
Srinivasan.Munuswamy
Thank you Tony! It helped a lot and I was able to solve the use case.

Thank you all for your support.

quote:
TABLE FILE CAR
BY COUNTRY
BY CAR
ON TABLE HOLD AS TITLES
END
-RUN
-SET &Title1 = ' <+0>';
-SET &Title2 = 'Model<+0>Body Type';
-REPEAT :Loop &LINES TIMES;
-READFILE TITLES
-SET &Title1 = &Title1 || (' <+0>'|&COUNTRY);
-SET &Title2 = &Title2 || (' <+0>'|&CAR);
-:Loop
TABLE FILE CAR
SUM DEALER_COST AS ''
BY MODEL AS ''
BY BODYTYPE AS ''
ACROSS COUNTRY NOPRINT
ACROSS CAR NOPRINT
HEADING
"&Title1.EVAL"
"&Title2.EVAL"
ON TABLE PCHOLD FORMAT XLSX
ON TABLE NOTOTAL
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
include=endeflt,$
TYPE=REPORT, FONT='VERDANA', SIZE=9, HEADALIGN=BODY, WRAP=OFF, $
TYPE=HEADING, SIZE=9, JUSTIFY=LEFT, $
TYPE=REPORT, COLUMN=DEALER_COST, WIDTH=.8, WRAP=.8, $
ENDSTYLE
END



Webfocus 8005, UNIX, PPT, HTML,EXL2K,EXL07, PDF. Oracle 11i
October 19, 2015, 07:52 AM
Tony A
quote:
It helped a lot and I was able to solve the use case.

Good to hear Smiler

You just need to mark this as solved. If you go to your very first post and click on the edit icon (lower right of the box) you can then add [SOLVED] to the post title. Post and the title will show Smiler

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10