I'm using WebFOCUS to output to FORMAT HTMTABLE, and then ultimately outputting to MS Word. There are multiple reports per "page", and I need them all to have the same grid width.
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
UNITS=IN, ORIENTATION=PORTRAIT, TOPMARGIN=0,LEFTMARGIN=0,RIGHTMARGIN=0,$
TYPE=REPORT,FONT='ARIAL', GRID=ON, WIDTH=7.00,$
ENDSTYLE
When the report opens, some of the grid widths are 7 inches, and some are 5.5, and some are 6.
Is there any way to make this a consistent grid width from one report to the next?This message has been edited. Last edited by: Kerry,
Production - 7.6.4 Sandbox - 7.6.4
March 14, 2012, 04:56 PM
Waz
Instead of using GRID, can you use BORDER={width}
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
March 15, 2012, 12:04 PM
ColdWhiteMilk
I don't understand what you mean.
Here is my actualy code. The first section results in 6.5 inches wide, the second ends up as 7.0 inches wide when it opens in Word.
-SET &ECHO=ALL;
SET ASNAMES = ON
SET DTSTANDARD = STANDARD
SET PAGE-NUM=NOPAGE
-*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-*REPORT HEADER
-*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FILEDEF OUTPUT1 DISK REPORT1.DOC
SET COMPONENT = 'report1'
DEFINE FILE BASELINE1
SECTIONDATA WITH FACILITYNAME/A1= '';
END
TABLE FILE BASELINE1
BY FACILITYNAME NOPRINT
HEADING
"HEADING TEXT - 1"
"HEADING TEXT - 2"
WHERE RECORDLIMIT EQ 0
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=REPORT, PAGESIZE='LETTER', ORIENTATION=PORTRAIT, GRID=ON, FONT='ARIAL', WIDTH=7.000,$
TYPE=HEADING,LINE=1,JUSTIFY=CENTER,STYLE=BOLD,SIZE=10,BACKCOLOR=RGB(210 210 210), WIDTH=7.000,$
TYPE=HEADING,LINE=2,JUSTIFY=CENTER,STYLE=BOLD,SIZE=10,BACKCOLOR=RGB(210 210 210), WIDTH=7.000,$
ENDSTYLE
ON TABLE HOLD AS REPORT1 FORMAT HTMTABLE
END
-RUN
-*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-*SECTION II
-*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FILEDEF OUTPUT1 DISK REPORT2.DOC
SET COMPONENT = 'report2'
DEFINE FILE BASELINE1
SECTIONDATA WITH FACILITYNAME/A1= '';
END
TABLE FILE BASELINE1
BY FACILITYNAME NOPRINT
HEADING
"HEADING TEXT"
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=REPORT, PAGESIZE='LETTER', ORIENTATION=PORTRAIT, GRID=ON, FONT='ARIAL', WIDTH=7.000,$
TYPE=HEADING,LINE=1,JUSTIFY=LEFT,STYLE=BOLD,SIZE=10,BACKCOLOR=RGB(210 210 210), WIDTH=7.000,$
ENDSTYLE
ON TABLE HOLD AS REPORT2 FORMAT HTMTABLE
END
-RUN
SET HTMLFORMTYPE=DOC
-HTMLFORM BEGIN
!IBI.FIL.REPORT1;
<P STYLE="PAGE-BREAK-BEFORE: NEVER">
!IBI.FIL.REPORT2;
-HTMLFORM END
-EXIT
Production - 7.6.4 Sandbox - 7.6.4
March 15, 2012, 01:57 PM
Danny-SRL
Hi CWM,
I took your code and CARified it:
-* File CWM02.fex
-SET &ECHO=ALL;
SET ASNAMES = ON
SET DTSTANDARD = STANDARD
SET PAGE-NUM=NOPAGE
-*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-*REPORT HEADER
-*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FILEDEF OUTPUT1 DISK REPORT1.DOC
SET COMPONENT = 'report1'
TABLE FILE CAR
BY COUNTRY
HEADING
"HEADING TEXT - 1"
"HEADING TEXT - 2"
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=REPORT, PAGESIZE='LETTER', ORIENTATION=PORTRAIT, GRID=ON, FONT='ARIAL', WIDTH=7.000,$
TYPE=HEADING,LINE=1,JUSTIFY=CENTER,STYLE=BOLD,SIZE=10,BACKCOLOR=RGB(210 210 210), WIDTH=7.000,$
TYPE=HEADING,LINE=2,JUSTIFY=CENTER,STYLE=BOLD,SIZE=10,BACKCOLOR=RGB(210 210 210), WIDTH=7.000,$
ENDSTYLE
ON TABLE HOLD AS REPORT1 FORMAT HTMTABLE
END
-RUN
-*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-*SECTION II
-*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FILEDEF OUTPUT1 DISK REPORT2.DOC
SET COMPONENT = 'report2'
TABLE FILE CAR
BY BODYTYPE
HEADING
"HEADING TEXT"
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=REPORT, PAGESIZE='LETTER', ORIENTATION=PORTRAIT, GRID=ON, FONT='ARIAL', WIDTH=7.000,$
TYPE=HEADING,LINE=1,JUSTIFY=LEFT,STYLE=BOLD,SIZE=10,BACKCOLOR=RGB(210 210 210), WIDTH=7.000,$
ENDSTYLE
ON TABLE HOLD AS REPORT2 FORMAT HTMTABLE
END
-RUN
SET HTMLFORMTYPE=DOC
-HTMLFORM BEGIN
!IBI.FIL.REPORT1;
<P STYLE="PAGE-BREAK-BEFORE: NEVER">
!IBI.FIL.REPORT2;
-HTMLFORM END
-EXIT
It works quite well. Report1 and Report2 have the same width.
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
March 15, 2012, 03:30 PM
ColdWhiteMilk
Danny-SRL:
Thank you for your help. It looks like you changed two pieces:
- I have the "BY" field as a NOPRINT - I have a RECORDLIMIT criteria.
My report is ONLY the headers, no data, so I don't want the COUNTRY values to appear.
Also, I ran the CAR version. When I change the screen view in Word from "Web View" to "Print Layout", then the grid width are still not even on the right.
This should squeeze both of your output tables to a 600 pixel limit.
March 15, 2012, 05:02 PM
Waz
quote:
I don't understand what you mean
My appologies, misinterpretation of grid width.This message has been edited. Last edited by: Waz,
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
March 16, 2012, 01:40 AM
Danny-SRL
CWM, Sorry, I took out the NOPRINT to see if it had an effect on the width, but none.
I returned the NOPRINT and added your RECORDLIMIT EQ 0 (although I am a bit sceptical about this condition, I would use EQ 1), still WebFOCUS didn't react and the output is totally aligned. I can send you the Word document, if you wish. So, maybe it is a question of version. I have WF 7.7.02 and Word 2010.
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
March 16, 2012, 10:57 AM
ColdWhiteMilk
quote:
Originally posted by John_Edwards: Wrap a table around both bang references --