Focal Point
GRANDTOTAL not lining up in EXL2K

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

April 23, 2007, 10:32 AM
simba
GRANDTOTAL not lining up in EXL2K
Hi:

My fex writes to an EXCEL spreadsheet and the GRANDTOTALs are not lined up with the rest of the column. They are 1 space over to the left compared to the rest of the column. I have tried WRAP and SQUEEZE to get the GRANDTOTALs to line up but nothing works. I believe the issue is related to that I'm using D8CB in my COMPUTE statements so that negatives will show with a bracket. I have taken the B off of the formatting and everything lines up. However, I want to show negative numbers with a bracket - does anyone know a way around this? I have included a sample fex that runs against the CAR table.

TABLE FILE CAR
SUM
COUNTRY
CAR
COMPUTE COST/D8CB = DEALER_COST;
COMPUTE SALES/D8CB = SALES;
BY COUNTRY NOPRINT
BY CAR NOPRINT
ON TABLE SUMMARIZE AS 'TOTAL'
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET PAGE-NUM OFF
ON TABLE SET EMPTYCELLS OFF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
-* WRAP=ON,
-* SQUEEZE=ON,
ORIENTATION=PORTRAIT,
PAGESIZE='LETTER',
LEFTMARGIN=0.000000,
RIGHTMARGIN=0.000000,
TOPMARGIN=0.000000,
BOTTOMMARGIN=0.000000,
$
TYPE=REPORT,
GRID=OFF,
FONT='ARIAL',
SIZE=8,
BACKCOLOR='NONE',
STYLE=NORMAL,
$
TYPE=TITLE,
COLUMN=P2,
STYLE=BOLD,
JUSTIFY=CENTER,
$
TYPE=TITLE,
COLUMN=P3,
STYLE=BOLD,
JUSTIFY=CENTER,
BACKCOLOR=RGB(190 190 190),
$
TYPE=TITLE,
COLUMN=P4,
STYLE=BOLD,
JUSTIFY=CENTER,
BACKCOLOR=RGB(190 190 190),
$
TYPE=GRANDTOTAL,
STYLE=BOLD,
JUSTIFY=RIGHT,
$
ENDSTYLE
END

Thanks in advance


WF 7.7/Windows
April 23, 2007, 11:03 AM
Leah
It appears to be the 'B' for bracket negative numbers, but why only on the total, who knows.


Leah
April 23, 2007, 11:36 AM
EvelynS
What version of WebFOCUS are you using and on what platform?
April 23, 2007, 12:10 PM
simba
We are using 7.1.4 on Windows.


WF 7.7/Windows
April 24, 2007, 10:29 AM
EvelynS
The following will get your end result. Because WebFOCUS retains the formatting of the field I created a new field for the total (if you have possible negative totals this is not a good solution) Let us know how this works for you. I left styling so you could see where code was being applied.

TABLE FILE CAR
SUM DEALER_COST/D9CB AS 'COST'
SALES/D9CB AS 'SALES'

COMPUTE TCOST/D9C = DEALER_COST; NOPRINT
COMPUTE TSALES/D9C = SALES; NOPRINT

BY COUNTRY SKIP-LINE
BY CAR
ON COUNTRY SUBFOOT MULTILINES
"Total <0> ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET PAGE-NUM OFF
ON TABLE SET EMPTYCELLS OFF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
-* WRAP=ON,
-* SQUEEZE=ON,
ORIENTATION=PORTRAIT,


PAGESIZE='LETTER',
LEFTMARGIN=0.000000,
RIGHTMARGIN=0.000000,
TOPMARGIN=0.000000,
BOTTOMMARGIN=0.000000,
$
TYPE=REPORT,
GRID=OFF,
FONT='ARIAL',
SIZE=8,
BACKCOLOR='NONE',
STYLE=NORMAL,
$
TYPE=TITLE,
COLUMN=P1,
STYLE=BOLD,
JUSTIFY=CENTER,
$
TYPE=TITLE,
COLUMN=P2,
STYLE=BOLD,
JUSTIFY=CENTER,
$
TYPE=TITLE,
COLUMN=P3,
STYLE=BOLD,
JUSTIFY=CENTER,
BACKCOLOR=RGB(190 190 190),
$
TYPE=TITLE,
COLUMN=P4,
STYLE=BOLD,
JUSTIFY=CENTER,
BACKCOLOR=RGB(190 190 190),
$
TYPE=SUBFOOT, HEADALIGN=BODY,$
TYPE=SUBFOOT, ITEM=1, JUSTIFY=RIGHT, STYLE=BOLD,$
TYPE=SUBFOOT, ITEM=3, JUSTIFY=RIGHT, STYLE=BOLD, COLOR=BLUE,$
TYPE=SUBFOOT, ITEM=4, JUSTIFY=RIGHT, STYLE=BOLD, COLOR=ORANGE,$
ENDSTYLE
END

$



ps this works for EXL2K and HTML not PDF
April 24, 2007, 12:19 PM
simba
Thank you!! However, yes it is possible for the totals to be negative. I guess I thought that if the total wasn't negative, there was a way to have it line up. I appreciate your help.


WF 7.7/Windows
April 24, 2007, 01:15 PM
simba
I entered an IBI ticket on this problem and this is their response:

Unfortunately, the behavior you described is a known problem.
Programming corrected an issue where the space was a problem and it was due to the B edit option allowing for the bracket to be displayed if the value was negative. This was not the intention for the display and the problem does not occur with HTML and PDF formats. At this time, there is no fix or workaround for this issue.

One thing would be to check if any of the values are negative. If not, you could potentially reformat the field(s) in question without the B edit option. If there are values that are negative, the only way I see potentially being able to display the value would be to use ON TABLE SUBFOOT for the display. Avoid the B edit option altogether for the field. If negative, you could convert it to alphanumeric format and display as required in the ON TABLE SUBFOOT and it should allow for the appropriate position.


WF 7.7/Windows
April 24, 2007, 06:14 PM
EvelynS
Look at this. By changing the format in the DEFINE, I was able to get POSITIVE and NEGATIVE results to line up.
DEFINE FILE CAR
CHGCOST/D9CB = IF CAR IS 'TRIUMPH' OR COUNTRY IS 'ITALY'
THEN (DEALER_COST * (-1)) ELSE DEALER_COST;
CHGSALE/D9CB = SALES;
END
TABLE FILE CAR
SUM CHGCOST AS 'COST'
CHGSALE AS 'SALES'

BY COUNTRY SKIP-LINE
BY CAR
ON COUNTRY SUBFOOT MULTILINES
"Total <0> ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET PAGE-NUM OFF
ON TABLE SET EMPTYCELLS OFF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
-* WRAP=ON,
-* SQUEEZE=ON,
ORIENTATION=PORTRAIT,


PAGESIZE='LETTER',
LEFTMARGIN=0.000000,
RIGHTMARGIN=0.000000,
TOPMARGIN=0.000000,
BOTTOMMARGIN=0.000000,
$
TYPE=REPORT,
GRID=OFF,
FONT='ARIAL',
SIZE=8,
BACKCOLOR='NONE',
STYLE=NORMAL,
$
TYPE=TITLE,
COLUMN=P1,
STYLE=BOLD,
JUSTIFY=CENTER,
$
TYPE=TITLE,
COLUMN=P2,
STYLE=BOLD,
JUSTIFY=CENTER,
$
TYPE=TITLE,
COLUMN=P3,
STYLE=BOLD,
JUSTIFY=CENTER,
BACKCOLOR=RGB(190 190 190),
$
TYPE=TITLE,
COLUMN=P4,
STYLE=BOLD,
JUSTIFY=CENTER,
BACKCOLOR=RGB(190 190 190),
$
TYPE=SUBFOOT, HEADALIGN=BODY,$
TYPE=SUBFOOT, ITEM=1, JUSTIFY=RIGHT, STYLE=BOLD,$
TYPE=SUBFOOT, ITEM=3, JUSTIFY=RIGHT, STYLE=BOLD, COLOR=BLUE,$
TYPE=SUBFOOT, ITEM=4, JUSTIFY=RIGHT, STYLE=BOLD, COLOR=ORANGE,$
ENDSTYLE
END
April 24, 2007, 06:19 PM
EvelynS
sorry part of my last cut and paste did not show up correctly, here is the SUBFOOT logic that got chopped off
ON COUNTRY SUBFOOT MULTILINES
"Total <0> ON TABLE PCHOLD FORMAT EXL2K