Focal Point
[SOLVED] Excel Column ID

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

April 23, 2013, 01:26 PM
Jveselka
[SOLVED] Excel Column ID
I am using Focus 7.6.4 and I have a report that is setup to output to Excel. My problem is, some of the cells are wider than they need to be. Below is the code in my style sheet and my question is how to I change these cells and leave the others as they are?

In HTML I would use COLUMN=N1, but that does not work in excel.

Thanks


ON TABLE SET STYLE *
UNITS=IN,
WRAP=1,
ORIENTATION=LANDSCAPE,
$
TYPE=REPORT,
GRID=OFF,
FONT='ARIAL',
SIZE=8,
$
TYPE=TITLE,
FONT='ARIAL',
STYLE=BOLD,
SIZE=8,
$
TYPE=TITLE,
COLUMN=N1,
WRAP=.5,
FONT='ARIAL',
STYLE=BOLD,
SIZE=8,
$
TYPE=DATA,
COLUMN=N1,
WRAP=.5,
FONT='ARIAL',
STYLE=BOLD,
SIZE=8,
$

TYPE=HEADING,
LINE=1,
JUSTIFY=CENTER,
$
TYPE=HEADING,
LINE=1,
OBJECT=TEXT,
ITEM=1,
SIZE=8,
STYLE=BOLD,
$
TYPE=HEADING,
LINE=2,
JUSTIFY=CENTER,
$
TYPE=HEADING,
LINE=2,
OBJECT=TEXT,
ITEM=1,
SIZE=8,
STYLE=BOLD,
$
TYPE=GRANDTOTAL,
STYLE=BOLD,
$
ENDSTYLE

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


WebFOCUS 8105m
Windows, All Outputs
April 23, 2013, 02:00 PM
Doug
Consider using the actual field name instead of the "N#" notation when identifying columns ("COLUMN=FIELD1" instead of "COLUMN=N1")
April 24, 2013, 10:58 AM
Jveselka
Doug, I tried using the column names but that did not work either. It is like it is ignoring whatever I put in. The only thing that works is setting the below code, but the report is still too wide to print on one page. All this does is set all columns to 1" which looks ok on the screen but some columns like cty code, dist and branch, which will never be more than 3 characters could be set to .5" to decrease the width of the report.


ON TABLE SET STYLE *
UNITS=IN,
WRAP=1,
ORIENTATION=LANDSCAPE,
$
TYPE=REPORT,
GRID=OFF,
FONT='ARIAL',
SIZE=8,
$
TYPE=TITLE,
FONT='ARIAL',
STYLE=BOLD,
SIZE=8,

Thanks


WebFOCUS 8105m
Windows, All Outputs
April 24, 2013, 11:09 AM
Mike Deluca
Try using SQUEEZE instead of WRAP..

TYPE=DATA,
COLUMN=N1,
SQUEEZE=0.5,
FONT='ARIAL',
STYLE=BOLD,
SIZE=8,
$


Prod/Dev: WebFOCUS 8.0.06 on Windows Server 2008/Tomcat , WebFOCUS DevStudio 8.0.06 on Windows 7
April 24, 2013, 11:10 AM
Francis Mariani
Please post the whole code (between code tags) - if you specify a report column more than once (e.g. once in a DEFINE or COMPUTE or NOPRINT and once on the report), you have to use syntax like this in the stylesheet:
COLUMN=COUNTRY(2)
...


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
April 28, 2013, 07:35 PM
Waz
I thought WRAP was the way to go.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

April 29, 2013, 09:07 AM
Jveselka
Yes, I think WRAP is the way to go DevStudio Online Help states that the SQUEEZE setting has no meaning in EXL2K.

Here is a copy of the code I am using.
Thanks

ON TABLE SET STYLE *
UNITS=IN,
-* WRAP=1.2,
ORIENTATION=LANDSCAPE,
$
TYPE=REPORT,
GRID=OFF,
FONT='ARIAL',
SIZE=8,
$
TYPE=TITLE,
COLUMN='DIST',
WRAP=.5,
FONT='ARIAL',
STYLE=BOLD,
SIZE=8,
$
TYPE=TITLE,
COLUMN='Cty',
WRAP=.5,
FONT='ARIAL',
STYLE=BOLD,
SIZE=8,
$
TYPE=HEADING,
JUSTIFY=CENTER,
OBJECT=TEXT,
SIZE=8,
STYLE=BOLD,
$
TYPE=FOOTING,
STYLE=BOLD,
BORDER-BOTTOM=LIGHT,
$
TYPE=GRANDTOTAL,
STYLE=BOLD,
$
ENDSTYLE


WebFOCUS 8105m
Windows, All Outputs
April 29, 2013, 11:24 AM
Jveselka
Ok, I figured out why my columns were not changing. I was not counting my BY fields which are set to NOPRINT. I had to start Counting in Column N7 to pick up the first printed field on my report. I was then able to use the WRAP command to fix my columns. Below is the code.

ON TABLE SET STYLE *
UNITS=IN,
ORIENTATION=LANDSCAPE,
$
TYPE=REPORT,
FONT='TIMES NEW ROMAN',
SIZE=10,
$
TYPE=TITLE,
COLUMN=N1,
BORDER-BOTTOM=LIGHT,
$
TYPE=TITLE,
COLUMN=N2,
BORDER-BOTTOM=LIGHT,
$
TYPE=TITLE,
COLUMN=N3,
BORDER-BOTTOM=LIGHT,
$
TYPE=TITLE,
COLUMN=N4,
BORDER-BOTTOM=LIGHT,
$
TYPE=TITLE,
COLUMN=N5,
BORDER-BOTTOM=LIGHT,
$
TYPE=TITLE,
COLUMN=N6,
BORDER-BOTTOM=LIGHT,
STYLE=BOLD,
$
TYPE=TITLE,
COLUMN=N7,
BORDER-BOTTOM=LIGHT,
STYLE=BOLD,
$
TYPE=TITLE,
COLUMN=N8,
BORDER-BOTTOM=LIGHT,
STYLE=BOLD,
$
TYPE=TITLE,
COLUMN=N9,
BORDER-BOTTOM=LIGHT,
STYLE=BOLD,
$
TYPE=TITLE,
COLUMN=N10,
BORDER-BOTTOM=LIGHT,
STYLE=BOLD,
$
TYPE=TITLE,
COLUMN=N11,
BORDER-BOTTOM=LIGHT,
STYLE=BOLD,
$
TYPE=TITLE,
COLUMN=N12,
BORDER-BOTTOM=LIGHT,
STYLE=BOLD,
$
TYPE=TITLE,
COLUMN=N13,
BORDER-BOTTOM=LIGHT,
STYLE=BOLD,
$
TYPE=TITLE,
COLUMN=N14,
BORDER-BOTTOM=LIGHT,
STYLE=BOLD,
$
TYPE=TITLE,
COLUMN=N15,
BORDER-BOTTOM=LIGHT,
STYLE=BOLD,
$
TYPE=TITLE,
COLUMN=N16,
BORDER-BOTTOM=LIGHT,
STYLE=BOLD,
$
TYPE=TITLE,
COLUMN=N17,
BORDER-BOTTOM=LIGHT,
STYLE=BOLD,
$
TYPE=HEADING,
JUSTIFY=CENTER,
STYLE=BOLD,
$
TYPE=HEADING,
LINE=1,
OBJECT=TEXT,
ITEM=1,
JUSTIFY=LEFT,
WIDTH=1.000,
$
TYPE=HEADING,
LINE=2,
OBJECT=TEXT,
ITEM=1,
JUSTIFY=LEFT,
WIDTH=1.000,
$
TYPE=REPORT,
COLUMN=N7,
WRAP=.5,
$
TYPE=REPORT,
COLUMN=N8,
$
TYPE=REPORT,
COLUMN=N9,
WRAP=.5,
$
TYPE=REPORT,
COLUMN=N10,
WRAP=.5,
$
TYPE=REPORT,
COLUMN=N11,
WRAP=1,
$
TYPE=REPORT,
COLUMN=N12,
WRAP=1,
$
TYPE=REPORT,
COLUMN=N13,
WRAP=1,
$
TYPE=REPORT,
COLUMN=N14,
WRAP=1,
$
TYPE=REPORT,
COLUMN=N15,
WRAP=1,
$
TYPE=REPORT,
COLUMN=N16,
WRAP=1,
$
TYPE=REPORT,
COLUMN=N17,
WRAP=1,
$
ENDSTYLE
END


WebFOCUS 8105m
Windows, All Outputs
April 29, 2013, 11:28 AM
Jveselka
Thanks for everyone’s help on this.


WebFOCUS 8105m
Windows, All Outputs
April 29, 2013, 05:49 PM
Waz
FYI,

The column notation supports P as well as N, you can reference by the output or printed columns.

Documentation states:

Pn

Identifies a column by its position in the report. To determine the value of n, count vertical sort (BY) fields, display fields, and ROW-TOTAL fields from left to right. Do not count NOPRINT fields.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!