Focal Point
SOLVED: exl2k output column width 0

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

August 13, 2009, 03:43 PM
sys1165a
SOLVED: exl2k output column width 0
I have a 12 month report going to exl2k. The user only wants to see the current month but wants the other months set to a width of 0 so that they can be widened and reviewed if needed. I've tried truncate but it only lets me set SQEEZE=0.1 which still shows on the spreadsheet. Any way to truly have the width of 0 so it can be widened when needed while viewing the spreadsheet? I can easily identify the current month and do a -SET &month8 to be normal but what do I do for the other &month fields that I want to be 0 in the styling?

This message has been edited. Last edited by: sys1165a,
August 13, 2009, 04:35 PM
Darin Lee
nope. There is no such thing as width 0 in WF. May not give you an error message, but it's not going to give you a 0 column width either.

As far as I know, there isn't a column width 0 in Excel either. You can hide/unhide columns, but if they appear, they've got to have a width.


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
August 15, 2009, 10:06 AM
<JG>
Use a macro and hide the columns you do not want to see. That's how Excel does it.
August 17, 2009, 10:13 AM
sys1165a
OK. Thanks. Since this is emailed to a multitude of people who aren't familiar with macros, I'll just rewrite it to only put out the current month and they'll have to look at another report to get all of the months if they need it.
August 19, 2009, 05:50 PM
Doug
Two points of interest here:

1) How about doing what you said (Aug 17 2009 10:13) BUT, add a drill down in the HEADING instead of requiring them "to look at another report to get all of the months if they need it."?

2) There is a column width of zero. It's the width that is set to a column when you "hide" it. Check it out by hiding a column and then (goto a cell in that column) and do a (Format / Column / Width) and you'll see that the "Column Width" is set to zero. You gotta be careful with the Excel Hide. If you hide a column and then copy a row of data that spans that column, you'll copy the contents of the hidden column as well... Wow.. that was long and drawn out... But, good, right?

Just a thought... Food for thought that is... Big Grin




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
August 19, 2009, 06:00 PM
Francis Mariani
How about using WRAP?

DEFINE FILE GGORDER
QTY/D6 = QUANTITY;
END

TABLE FILE GGORDER
SUM
QTY AS ''
ACROSS HIGHEST ORDER_DATE AS ''
BY PRODUCT_DESCRIPTION

HEADING
"GG ORDERS BY PRODUCT"
ON TABLE PCHOLD FORMAT EXL2K

ON TABLE SET STYLE *
TYPE=REPORT, FONT='ARIAL', SIZE=9, $
TYPE=HEADING, STYLE=BOLD, $
TYPE=ACROSSVALUE, JUSTIFY=RIGHT, COLOR=NAVY, STYLE=BOLD, $
TYPE=REPORT, ACROSSCOLUMN=QTY, WRAP=0.1, COLOR=RED, $
TYPE=REPORT, COLUMN=c01, WRAP=1, COLOR=BLUE, $
ENDSTYLE
END



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
August 19, 2009, 06:54 PM
Doug
I like that option Francis,

Of course the obvious: Change the RED to WHITE as the RED was used for illustrative purposes in: "TYPE=REPORT, ACROSSCOLUMN=QTY, WRAP=0.1, COLOR=RED, $" and maximize the columns as desired...
August 25, 2009, 02:24 PM
sys1165a
I tried this in developer 5.4.3
-READ SYCTBL &PERIOD.A2.
-RUN
-SET &COL_WIDTH1 = IF &PERIOD EQ '01' THEN '' ELSE 'TYPE=REPORT,COLUMN=N10,SQUEEZE=0.097222,$';
-SET &COL_WIDTH2 = IF &PERIOD EQ '02' THEN '' ELSE 'TYPE=REPORT,COLUMN=N11,SQUEEZE=0.097222,$';
-SET &COL_WIDTH3 = IF &PERIOD EQ '03' THEN '' ELSE 'TYPE=REPORT,COLUMN=N12,SQUEEZE=0.097222,$';
-SET &COL_WIDTH4 = IF &PERIOD EQ '04' THEN '' ELSE 'TYPE=REPORT,COLUMN=N13,SQUEEZE=0.097222,$';
-SET &COL_WIDTH5 = IF &PERIOD EQ '05' THEN '' ELSE 'TYPE=REPORT,COLUMN=N14,SQUEEZE=0.097222,$';
-SET &COL_WIDTH6 = IF &PERIOD EQ '06' THEN '' ELSE 'TYPE=REPORT,COLUMN=N15,SQUEEZE=0.097222,$';
and then in the stylesheet
&COL_WIDTH1
&COL_WIDTH2
&COL_WIDTH3
&COL_WIDTH4
&COL_WIDTH5
&COL_WIDTH6
TYPE=HEADING, SIZE=10, COLOR=NAVY,
$
which sort of worked in developer except I couldn't get the width to 0 so a little bit always showed (looked messy) and it didn't work in ReportCaster 7.1.1 which is where production ran from. So I abandoned the idea.
August 25, 2009, 03:05 PM
sys1165a
I tried the WRAP and it worked but again gave small widths instead of 0. It also caused my heading row to have a height of 384 which I'm not sure the users would know how to fix. But that could be a viable solution.
Thanks to everyone for their suggestions!