Focal Point
[SOLVED] Column Header Name In exl format report

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

June 02, 2009, 05:57 PM
Dinesh1982
[SOLVED] Column Header Name In exl format report
SET COMPOUND=BYTOC
TABLE FILE CAR
PRINT SALES BY COUNTRY NOPRINT BY CAR
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET STYLE *
type=report, style=bold, color=yellow, backcolor=black, $
type=data, backcolor=red, $
type=data, column=car, color=blue, backcolor=yellow, $
END

The above code returns the same colomn name (CAR,SALES) in eac tab of the excel report.

If i wantted to change the column header name like UK tab (UK CAR,UK Sales) US tab (US CAR,US Sales).

Is it possible...? If Yes please let me know the solution.

Thanks

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


WebFOCUS 764
Unix
Excel, HTML, PDF
June 02, 2009, 06:27 PM
Doug
Yes WebFOCUS can do that...

Read up on the DEFINE FILE for starters to redefine the country as desired, not that I see any cars in there from the US.

This forum is really to help others... Not to provide solutions, right?
June 02, 2009, 06:34 PM
Darin Lee
The BYTOC functionality creates the exact same report (layout) for each section/tab of the report. Meaning that you get the same column titles for every section of report. Even re-defining a column will not help you there.

About your only hope would be to create a compound excel document an re-run the report for each country, using an &variable in the AS 'columntitle' phrase.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
June 02, 2009, 06:52 PM
Doug
You're right Darin, The DEFINE would only be the first step with regards to a DEFINE of the field containing the UK and US values after which the &variables would come in.
June 03, 2009, 02:37 AM
<JG>
As an alternative use a template/macro to reformat
June 03, 2009, 03:04 AM
Danny-SRL
Dinesh,
You can also discard TITLEs and use HEADING instead, with a DEFINE:
-* File Dinesh1.fex
DEFINE FILE CAR
CARHEAD/A20 =COUNTRY || ' CAR';
SALESHEAD/A20=COUNTRY || ' SALES';
END
SET COMPOUND=BYTOC
TABLE FILE CAR
PRINT SALES AS '' 
BY COUNTRY NOPRINT 
BY CAR AS ''
HEADING
"<CARHEAD<SALESHEAD"

ON TABLE PCHOLD FORMAT EXL2K

ON TABLE SET STYLE *
type=report, style=bold, color=yellow, backcolor=black, $
type=data, backcolor=red, $
type=data, column=car, color=blue, backcolor=yellow, $
TYPE=HEADING, HEADALIGN=BODY, $
ENDSTYLE
END



Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

June 03, 2009, 11:27 AM
Darin Lee
Have not tested this, but one thing you may want to try is inserting your column headings into a subhead (where you can embed field values) and then adding AS '' to each displayed field. Also some variation of conditional subheadings may work.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
June 03, 2009, 06:31 PM
Doug
Excellent solution Dinesh / Darin... I've used that technique and it works quite nicely...