Focal Point
Border/Subtotal formatting

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

January 25, 2005, 07:51 PM
reFOCUSing
Border/Subtotal formatting
Here is what I'm trying to do, I would like to display a light top border and a heavy bottom border. In html output only the top border appears, in exl2k none of the borders display and in pdf both borders appear but there is a space before the bottom border.

Also I would like to display a subtotal line that does not repeat the by field's information. This is why I compute a blank field.

Does anyone know a solution to either of the problems?
I'm running WF 5.2.5.

Here is the code:

-* File subtotal.fex
-SET &RGB_GREY = 'RGB(210 210 210)';
-SET &HD_PAGE_NUM = '"Page: -SET &FD_RAN_DATE = '"Date Printed: ' | EDIT(&YYMD, '9999/99/99') | ' at ' | &TOD | '"';
-RUN

-* Create Hold file.
TABLE FILE CAR
SUM
RETAIL_COST
DEALER_COST
SALES
COMPUTE SPACE/A5 = '';
BY COUNTRY
BY CAR
BY MODEL
BY BODYTYPE
WHERE CAR IN ('BMW','ALFA ROMEO','JAGUAR','AUDI','DATSUN')
ON TABLE HOLD AS H0 FORMAT ALPHA
END
-RUN

-* Dispay report.
TABLE FILE H0
HEADING
" "
"Vehicle Cost"
" "
&HD_PAGE_NUM
" "
FOOTING
" "
&FD_RAN_DATE
PRINT
RETAIL_COST AS 'Retail Cost'
DEALER_COST AS 'Dealer Cost'
BY COUNTRY NOPRINT
BY CAR NOPRINT
BY SPACE NOPRINT
BY MODEL AS 'Model'
BY BODYTYPE AS 'Bodytype'
BY SALES AS 'Sales'
ON COUNTRY PAGE-BREAK
ON SPACE SUBTOTAL RETAIL_COST DEALER_COST AS 'Total: '
ON SPACE SUBHEAD
" "
"Country: "Car: " "
ON SPACE SUBFOOT
" "
-*ON TABLE SET ONLINE-FMT PDF
-*ON TABLE SET ONLINE-FMT EXL2K
ON TABLE NOTOTAL
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,LEFTMARGIN=0.000000,RIGHTMARGIN=0.000000,
TOPMARGIN=0.000000,BOTTOMMARGIN=0.000000,$
DEFMACRO=TOT,BORDER-TOP=LIGHT,BORDER-BOTTOM=HEAVY,BACKCOLOR=&RGB_GREY,STYLE=BOLD,$
PAGESIZE='LETTER',ORIENTATION=LANDSCAPE,$
TYPE=REPORT,GRID=OFF,SIZE=8,SQUEEZE=ON,FONT='ARIAL',$
TYPE=HEADING,LINE=1,COLSPAN=5,STYLE=BOLD,JUSTIFY=CENTER,$
TYPE=HEADING,LINE=2,COLSPAN=5,STYLE=BOLD,JUSTIFY=CENTER,$
TYPE=SUBHEAD,ITEM=1,STYLE=BOLD,$
TYPE=SUBTOTAL,COLUMN=RETAIL_COST,MACRO=TOT,$
TYPE=SUBTOTAL,COLUMN=DEALER_COST,MACRO=TOT,$
ENDSTYLE
END
-RUN

This message has been edited. Last edited by: <Mabel>,
January 26, 2005, 09:17 PM
<John Osborn>
The behaviour for html and pdf should be the same, but I have found that Excel always loses borders... The WebFOCUS implementation of Excel does not seem to respect the border features at all.

The problem that you are having with losing the bottom border seems to be a bug (I am running 5.3.2 and it is still losing the bottom border).

You can "fix" the symptom if you make the whole of the subtotal line have the bottom-border.

i.e. Remove the COLUMN=DEALER_COST as in:

TYPE=SUBTOTAL,MACRO=TOT,$
Regarding the blank column... You would not need to do a hold file if you changed SPACE to a DEFINE instead of a COMPUTE...

i.e.




DEFINE FILE CAR
SPACE/A1 WITH CAR = ' ';
END

TABLE FILE CAR
WHERE CAR IN ('BMW','ALFA ROMEO','JAGUAR','AUDI','DATSUN')

-*...then all the lines after TABLE FILE H0
...
END

This message has been edited. Last edited by: <Mabel>,
January 27, 2005, 01:15 PM
reFOCUSing
Thanks for the help.

I was figuring that the border thing was bug since it would work for the whole line.