Focal Point
[SOLVED] How do I split Column heading

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

August 17, 2018, 02:39 PM
Raju
[SOLVED] How do I split Column heading
I have table like below.

DOC NAME REGIONAL AREA OFFICE COUNT AMOUNT
OFFICE

but needs to change like below. Column names count and amount has to split and one more heading like "Approval Rate (%)"

Approval Rate(%)
DOC NAME REGIONAL AREA OFFICE COUNT AMOUNT
OFFICE

Could you please help?

This message has been edited. Last edited by: FP Mod Chuck,
August 17, 2018, 03:15 PM
MartinY
Maybe it's because we're Friday but I don't understand what you are requesting.

Can you reproduce with IB sample file such as CAR ? Or at least provide more information.

Please, when providing code sample, data sample or result sample use the code tag which is the last one on the ribbon :
</>

TABLE FILE CAR
SUM RETAIL AS 'This is,Retail $'
BY COUNTRY AS 'This is, Country'
BY CAR AS 'This is, Car'
HEADING
"This is the Heading"
END


Thanks


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
August 17, 2018, 04:53 PM
jcannavo
No MartinY, it's not just because it's Friday Big Grin . Raju, please be clear on exactly what you are looking for. As far as I can tell from looking at your question and example it looks as though you just want to add an additional heading above the columns. You can do what Martin showed or:

 TABLE FILE CAR
BY  CAR.ORIGIN.COUNTRY
BY  CAR.COMP.CAR
BY  CAR.CARREC.MODEL
ON TABLE SUBHEAD
"Approval Rate(%)"
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/warm.sty,
$
ENDSTYLE
END 


If this is not what you are looking for please provide some more information for us.


JC
WebFOCUS Dev Studio / App Studio
8.2.01
Windows 7
August 19, 2018, 05:26 PM
Raju
I am sorry for late reply.

I am looking table like below.

I need to generate data for 5 columns.

column1 doc, column2 Name, column3 regional office, column 4 area office and column five Approval rate (%) is sub head and below Count and amount separate columns.

Column 5 example like below.
--------------------
Approval Rate (%)
--------------------
Count | Amount

1 | $123
2 | $567

Count and Amount columns and data populated correctly but I need to add "Approval Rate (%)" heading on above the count and amount columns.

Thank you for your help.
August 19, 2018, 09:24 PM
BabakNYC
What would the formula be for the approval rate?


WebFOCUS 8206, Unix, Windows
August 20, 2018, 06:01 AM
Chaudhary
Raju,
try something like this,
  
DEFINE FILE A
AR/A20 = 'Approval rate (%)';
END 

TABLE FILE A
SUM
Count 
Amount 
BY doc
BY NAME
BY RAGIONAL OFFICE
ACROSS AS AS ''
END



WF Production :- WF:8.0.0.4, 8.1.05 App-studio/Developer Studio(8.1.x) ,
8.2.0.1M , 8.2.0.2 (App-Studio8.2.x),
InfoAssist/+, InfoDiscovery
Output format:-AHTML, PDF, Excel, HTML
Platform:-Windows 7, 8,10
August 20, 2018, 08:07 AM
Tony A
Perhaps one of the easier(?) methods of doing this could be the following in which I've coloured the cells that I think you are trying to manipulate. -

TABLE FILE CAR
SUM RCOST AS ''
    DCOST AS ''
BY  COUNTRY AS ''
BY  CAR AS ''
BY  MODEL AS ''
ON TABLE SUBHEAD
" <+0> <+0> <+0>Approval Rate(%)"
"Country<+0>Manufacturer<+0>Model<+0>Retail<+0>Cost"
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
  INCLUDE=IBFS:/EDA/EDASERVE/_EDAHOME/ETC/warm.sty, $
  TYPE=REPORT, HEADALIGN=BODY, $
  TYPE=TABHEADING, SIZE=10, STYLE=-BOLD, $
  TYPE=TABHEADING, LINE=1, ITEM=4, JUSTIFY=CENTER, BACKCOLOR=RGB(200 200 200), COLSPAN=2, $
  TYPE=TABHEADING, LINE=2, ITEM=4, JUSTIFY=CENTER, BACKCOLOR=RGB(200 200 200), $
  TYPE=TABHEADING, LINE=2, ITEM=5, JUSTIFY=CENTER, BACKCOLOR=RGB(200 200 200), $
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 
August 20, 2018, 08:37 AM
Raju
I have code like this for count and amount, but I need to add heading or subheading "Approval Rate (%)"

TABLE FILE WAIVDB
SUM
COMPUTE REG_CNT_PCT/D6.2%= IF (HWVRGRP EQ 'Regular' OR 'Denial')
THEN (REG / TOT_CNT) * 100 ELSE 0;
AS 'COUNT'

COMPUTE REG_AMT_PCT/D6.2%= IF (HWVRGRP EQ 'Regular' OR 'Denial')
THEN (HWVAAMT / (HWVAAMT + HWVDAMT) * 100) ELSE 0;
AS 'AMOUNT'

HEADING CENTER
" FY2018 TOP FOs (>50 Waivers,>80% Approval Rate) "
ON TABLE HOLD AS FOSS FORMAT EXL2K MISSING OFF
ON TABLE SET STYLE *
TYPE=REPORT, FONT=TREBUCHET MS, GRID=ON, BORDER=HEAVY,$
ENDSTYLE
END
August 20, 2018, 08:54 AM
Frans
Something like this?
 
TABLE FILE CAR
SUM SALES
COMPUTE RATE/D5.2%= RETAIL_COST / DEALER_COST; NOPRINT

BY COUNTRY
ON COUNTRY SUBHEAD
"Approval rate (%) for < COUNTRY : <RATE"

END
 



Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
August 20, 2018, 11:52 AM
Raju
SUB heading is not dynamic "Approval Rate (%)", two columns: count and amount, on top of those two columns sub heading is "Approval Rate (%)"

all the data populates only I need to add sub-heading
August 20, 2018, 12:14 PM
Kofi
Already a solution is shown, see some post over this by Tony A.

Kofi


Client Server 8.1.05: Apache; Tomcat;Windows Server 2012
Reporting Server 8.1.05; Oracle; MS SQL; Windows Server 2012