Focal Point
[CLOSED] {sort of} Space Issue in HTML formatting - Extra Unwatned Rows

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

February 25, 2011, 12:25 PM
Damon
[CLOSED] {sort of} Space Issue in HTML formatting - Extra Unwatned Rows
I am creating a Document Composer layout with multiple fexes (7.7.02 with MRE/Portal).

I need a tight clean layout, but each of the fexes generates HTML output that includes two extra rows
 <TR> 
- one between the heading and the table of data, and one that shows up as an extra last row in the table of data - neither are desired. I would love to know how to remove both of these rows.

I am including below the example fex, and the HTML output.
-DEFAULT &DBS1 = 'NEU'
-DEFAULT &Year = '2010'
-DEFAULT &Month = '01'

-SET &YEARMO = &Year || &Month ;

TABLE FILE NDAY_FPA_SUMMARY
SUM 
     COMPUTE ardays/D8.2 = TOTAL_INVOICE_BAL_AMT / AVG_CHARGE_PER_DAY; AS 'AR Days'
	 BY DBS1
WHERE DBS1 EQ '&DBS1';
WHERE YEARMO EQ '&YEARMO';
ON TABLE SET PAGE-NUM OFF 
ON TABLE NOTOTAL
ON TABLE HOLD AS ARDAYSHOLD FORMAT ALPHA
END

TABLE FILE NDAY_BENCHMARK
SUM 
     METRIC_NUM NOPRINT 
     MAX.BENCHMARK_NUM/I2c AS 'Target'
BY  LOWEST DBS1
WHERE DBS1 EQ '&DBS1';
WHERE METRIC_NUM EQ 101;
WHERE YEARMO EQ '&YEARMO';
ON TABLE SET PAGE-NUM NOLEAD 
ON TABLE NOTOTAL
ON TABLE HOLD AS ARDAYSBENCH FORMAT ALPHA

END

JOIN
 ARDAYSHOLD.ARDAYSHO.DBS1 IN ARDAYSHOLD TO MULTIPLE ARDAYSBENCH.ARDAYSBE.DBS1
 IN ARDAYSBENCH TAG J0 AS J0
 END
TABLE FILE ARDAYSHOLD
SUM 
     BENCHMARK_NUM AS 'Target' OVER 
     ardays AS 'Actual AR Days'
HEADING
"AR Days"
ON TABLE SET PAGE-NUM NOLEAD 
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = endeflt,
$
     LEFTMARGIN=0.000000,
     RIGHTMARGIN=0.000000,
     TOPMARGIN=0.000000,
     BOTTOMMARGIN=0.000000,
$
TYPE=DATA,
     COLUMN=N2,
     BORDER-TOP=LIGHT,
     BORDER-BOTTOM=LIGHT,
     BORDER-LEFT=LIGHT,
     BORDER-RIGHT=LIGHT,
     BORDER-TOP-COLOR=RGB(18 72 124),
     BORDER-BOTTOM-COLOR=RGB(18 72 124),
     BORDER-LEFT-COLOR=RGB(18 72 124),
     BORDER-RIGHT-COLOR=RGB(18 72 124),
     FONT='CALIBRI',
     SIZE=11,
     COLOR='BLACK',
     BACKCOLOR='NONE',
     STYLE=NORMAL,
     JUSTIFY=RIGHT,
$
TYPE=DATA,
     COLUMN=N1,
     BORDER-TOP=LIGHT,
     BORDER-BOTTOM=LIGHT,
     BORDER-LEFT=LIGHT,
     BORDER-RIGHT=LIGHT,
     BORDER-TOP-COLOR=RGB(18 72 124),
     BORDER-BOTTOM-COLOR=RGB(18 72 124),
     BORDER-LEFT-COLOR=RGB(18 72 124),
     BORDER-RIGHT-COLOR=RGB(18 72 124),
     FONT='CALIBRI',
     SIZE=11,
     COLOR='BLACK',
     BACKCOLOR='NONE',
     JUSTIFY=RIGHT,
$
TYPE=TITLE,
     COLUMN=N2,
     FONT='CALIBRI',
     SIZE=11,
     BACKCOLOR=RGB(18 72 124),
     JUSTIFY=LEFT,
$
TYPE=TITLE,
     COLUMN=N1,
     FONT='CALIBRI',
     SIZE=11,
     BACKCOLOR=RGB(18 72 124),
     JUSTIFY=LEFT,
$
TYPE=HEADING,
     LINE=1,
     JUSTIFY=LEFT,
$
TYPE=HEADING,
     LINE=1,
     OBJECT=TEXT,
     ITEM=1,
     FONT='CALIBRI',
     SIZE=11,
     COLOR=RGB(18 72 124),
     STYLE=BOLD+UNDERLINE,
$
TYPE=REPORT,
     COLUMN=N2,
     SQUEEZE=1.88,
$
TYPE=REPORT,
     COLUMN=N1,
     SQUEEZE=1.88,
$
ENDSTYLE
END


< !--Olap java_script-->
<HTML>
<HEAD>
<META name="HandheldFriendly" content="True">
<META name="PalmComputingPlatform" content="True">
<TITLE>WebFOCUS Report</TITLE>
<STYLE TYPE="text/css">
< !--
TABLE { border-collapse:collapse; }
TD { vertical-align:top; padding-left:6pt; padding-right:6pt; }
.x3 { font-family:TREBUCHET MS; font-size:9pt; color:#424649;
 border-style: NONE; }
.x8 { font-family:TREBUCHET MS; font-size:9pt; color:#424649;
 border-top: 1.00pt SOLID #12487C; border-bottom: NONE; border-right: NONE; border-left: NONE; }
.x7 { font-family:CALIBRI; font-size:11pt; color:#000000; text-align:right;
 border-top: 1.00pt SOLID #12487C; border-bottom: NONE; border-right: 1.00pt SOLID #12487C; border-left: 1.00pt SOLID #12487C; }
.x5 { font-family:CALIBRI; font-size:11pt; color:#000000; text-align:right;
 border-top: 1.00pt SOLID #12487C; border-bottom: NONE; border-right: 1.00pt SOLID #12487C; border-left: 1.00pt SOLID #12487C; }
.x6 { font-family:CALIBRI; font-size:11pt; font-weight:bold; color:#FFFFFF; background-color:#12487C; text-align:left;
 border-style: NONE; }
.x4 { font-family:CALIBRI; font-size:11pt; font-weight:bold; color:#FFFFFF; background-color:#12487C; text-align:left;
 border-style: NONE; }
.x1 { font-family:TREBUCHET MS; font-size:12pt; font-weight:bold; color:#424649; text-align:center;
 border-style: NONE; }
.x2 { font-family:CALIBRI; font-size:11pt; font-weight:bold; text-decoration:underline; color:#12487C; text-align:left;
 border-style: NONE; }
-->
</STYLE>
</HEAD>
<BODY>
<TABLE CELLPADDING=1 style='margin-left:0pt;margin-right:0pt;margin-top:0pt;margin-bottom:0pt'>
<COL>
<COL STYLE="WIDTH:135pt">
<COL>
<COL STYLE="WIDTH:135pt">
<TR><TD style='padding-left:0pt' COLSPAN=2 class='x1'>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%">
<TR>
<TD class='x2'>
AR Days</TD>
</TR>
</TABLE></TD></TR>
<TR>
<TD COLSPAN=2 class='x1'>
 </TD>
</TR>
<TR>
<TD class='x4'>
Target</TD>
<TD class='x5'>
80.00</TD>
</TR>
<TR>
<TD class='x6'>
Actual AR Days</TD>
<TD class='x7'>
68.39</TD>
</TR>
<TR>
<TD  class='x3'> </TD>
<TD  class='x8'> </TD>
</TR>
</TABLE>
</BODY>
</HTML>

This message has been edited. Last edited by: Damon,


Damon
WF 7.7.02M LINUX
PMF 5.3.1
HTML, PDF, EXCEL
February 27, 2011, 04:21 PM
Waz
Can you please put your HTML code within the code tags. Please use the
[code]
[/code]
button to add the tags.

This message has been edited. Last edited by: Waz,


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!

February 28, 2011, 07:13 PM
Damon
Sorry - it was my first time posting. - I hope you can read this now. Thanks!

  <!--Olap Javascript-->
<HTML>
<HEAD>
<META name="HandheldFriendly" content="True">
<META name="PalmComputingPlatform" content="True">
<TITLE>WebFOCUS Report</TITLE>
<STYLE TYPE="text/css">
<!--
TABLE { border-collapse:collapse; }
TD { vertical-align:top; padding-left:6pt; padding-right:6pt; }
.x3 { font-family:TREBUCHET MS; font-size:9pt; color:#424649;
 border-style: NONE; }
.x8 { font-family:TREBUCHET MS; font-size:9pt; color:#424649;
 border-top: 1.00pt SOLID #12487C; border-bottom: NONE; border-right: NONE; border-left: NONE; }
.x7 { font-family:CALIBRI; font-size:11pt; color:#000000; text-align:right;
 border-top: 1.00pt SOLID #12487C; border-bottom: NONE; border-right: 1.00pt SOLID #12487C; border-left: 1.00pt SOLID #12487C; }
.x5 { font-family:CALIBRI; font-size:11pt; color:#000000; text-align:right;
 border-top: 1.00pt SOLID #12487C; border-bottom: NONE; border-right: 1.00pt SOLID #12487C; border-left: 1.00pt SOLID #12487C; }
.x6 { font-family:CALIBRI; font-size:11pt; font-weight:bold; color:#FFFFFF; background-color:#12487C; text-align:left;
 border-style: NONE; }
.x4 { font-family:CALIBRI; font-size:11pt; font-weight:bold; color:#FFFFFF; background-color:#12487C; text-align:left;
 border-style: NONE; }
.x1 { font-family:TREBUCHET MS; font-size:12pt; font-weight:bold; color:#424649; text-align:center;
 border-style: NONE; }
.x2 { font-family:CALIBRI; font-size:11pt; font-weight:bold; text-decoration:underline; color:#12487C; text-align:left;
 border-style: NONE; }
-->
</STYLE>
</HEAD>
<BODY>
<TABLE CELLPADDING=1 style='margin-left:0pt;margin-right:0pt;margin-top:0pt;margin-bottom:0pt'>
<COL>
<COL STYLE="WIDTH:135pt">
<COL>
<COL STYLE="WIDTH:135pt">
<TR><TD style='padding-left:0pt' COLSPAN=2 class='x1'>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%">
<TR>
<TD class='x2'>
AR Days</TD>
</TR>
</TABLE></TD></TR>
<TR>
<TD COLSPAN=2 class='x1'>
 </TD>
</TR>
<TR>
<TD class='x4'>
Target</TD>
<TD class='x5'>
80.00</TD>
</TR>
<TR>
<TD class='x6'>
Actual AR Days</TD>
<TD class='x7'>
68.39</TD>
</TR>
<TR>
<TD  class='x3'> </TD>
<TD  class='x8'> </TD>
</TR>
</TABLE>
</BODY>
</HTML>
<!--
(FOC227) THE FOCEXEC PROCEDURE CANNOT BE FOUND: FPA_SEC_DEPT
(FOC227) THE FOCEXEC PROCEDURE CANNOT BE FOUND: FPA_SEC_DIV
(FOC227) THE FOCEXEC PROCEDURE CANNOT BE FOUND: FPA_SEC_PROV
(FOC227) THE FOCEXEC PROCEDURE CANNOT BE FOUND: FPA_SEC_NONE
SET FPA SECURITY FOR JZHU01
0 NUMBER OF RECORDS IN TABLE=        1  LINES=      1
ALPHANUMERIC RECORD NAMED  ACSLVL
0 FIELDNAME                         ALIAS         FORMAT        LENGTH
ACCESS_LEVEL                      ACCESS_LEVEL  P3              3
TOTAL                                                           3
0 NUMBER OF RECORDS IN TABLE=        1  LINES=      1
0 NUMBER OF RECORDS IN TABLE=        1  LINES=      1
0 NUMBER OF RECORDS IN TABLE=        1  LINES=      1
0 HOLDING HTML FILE ON PC DISK ...

-->



Damon
WF 7.7.02M LINUX
PMF 5.3.1
HTML, PDF, EXCEL
February 28, 2011, 07:22 PM
Damon
I noticed my post was cut off. I am trying to tighten up a layout in Dcoument Composer - and each fex has two extra rows that I am not asking for in my code; one between the heading and the table of data, and one that shows up as an extra last row in the table of data - neither are desired. I would love to know how to remove both of these rows.


Damon
WF 7.7.02M LINUX
PMF 5.3.1
HTML, PDF, EXCEL
March 01, 2011, 09:40 AM
Francis Mariani
Damon, please edit your original posting and put the code between
[code]
[/code]
tags. Please post the fex that you're executing, not the result of the execution.


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
March 01, 2011, 10:24 AM
Damon
Francis,

Here is the fex... Thanks!

  -DEFAULT &DBS1 = 'NEU'
-DEFAULT &Year = '2010'
-DEFAULT &Month = '01'

-SET &YEARMO = &Year || &Month ;

TABLE FILE NDAY_FPA_SUMMARY
SUM 
COMPUTE ardays/D8.2 = TOTAL_INVOICE_BAL_AMT / AVG_CHARGE_PER_DAY; AS 'AR Days'
BY DBS1
WHERE DBS1 EQ '&DBS1';
WHERE YEARMO EQ '&YEARMO';
ON TABLE SET PAGE-NUM OFF 
ON TABLE NOTOTAL
ON TABLE HOLD AS ARDAYSHOLD FORMAT ALPHA
END

TABLE FILE NDAY_BENCHMARK
SUM 
METRIC_NUM NOPRINT 
MAX.BENCHMARK_NUM/I2c AS 'Target'
BY LOWEST DBS1
WHERE DBS1 EQ '&DBS1';
WHERE METRIC_NUM EQ 101;
WHERE YEARMO EQ '&YEARMO';
ON TABLE SET PAGE-NUM NOLEAD 
ON TABLE NOTOTAL
ON TABLE HOLD AS ARDAYSBENCH FORMAT ALPHA

END

JOIN
ARDAYSHOLD.ARDAYSHO.DBS1 IN ARDAYSHOLD TO MULTIPLE ARDAYSBENCH.ARDAYSBE.DBS1
IN ARDAYSBENCH TAG J0 AS J0
END
TABLE FILE ARDAYSHOLD
SUM 
BENCHMARK_NUM AS 'Target' OVER 
ardays AS 'Actual AR Days'
HEADING
"AR Days"
ON TABLE SET PAGE-NUM NOLEAD 
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = endeflt,
$
LEFTMARGIN=0.000000,
RIGHTMARGIN=0.000000,
TOPMARGIN=0.000000,
BOTTOMMARGIN=0.000000,
$
TYPE=DATA,
COLUMN=N2,
BORDER-TOP=LIGHT,
BORDER-BOTTOM=LIGHT,
BORDER-LEFT=LIGHT,
BORDER-RIGHT=LIGHT,
BORDER-TOP-COLOR=RGB(18 72 124),
BORDER-BOTTOM-COLOR=RGB(18 72 124),
BORDER-LEFT-COLOR=RGB(18 72 124),
BORDER-RIGHT-COLOR=RGB(18 72 124),
FONT='CALIBRI',
SIZE=11,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
JUSTIFY=RIGHT,
$
TYPE=DATA,
COLUMN=N1,
BORDER-TOP=LIGHT,
BORDER-BOTTOM=LIGHT,
BORDER-LEFT=LIGHT,
BORDER-RIGHT=LIGHT,
BORDER-TOP-COLOR=RGB(18 72 124),
BORDER-BOTTOM-COLOR=RGB(18 72 124),
BORDER-LEFT-COLOR=RGB(18 72 124),
BORDER-RIGHT-COLOR=RGB(18 72 124),
FONT='CALIBRI',
SIZE=11,
COLOR='BLACK',
BACKCOLOR='NONE',
JUSTIFY=RIGHT,
$
TYPE=TITLE,
COLUMN=N2,
FONT='CALIBRI',
SIZE=11,
BACKCOLOR=RGB(18 72 124),
JUSTIFY=LEFT,
$
TYPE=TITLE,
COLUMN=N1,
FONT='CALIBRI',
SIZE=11,
BACKCOLOR=RGB(18 72 124),
JUSTIFY=LEFT,
$
TYPE=HEADING,
LINE=1,
JUSTIFY=LEFT,
$
TYPE=HEADING,
LINE=1,
OBJECT=TEXT,
ITEM=1,
FONT='CALIBRI',
SIZE=11,
COLOR=RGB(18 72 124),
STYLE=BOLD+UNDERLINE,
$
TYPE=REPORT,
COLUMN=N2,
SQUEEZE=1.88,
$
TYPE=REPORT,
COLUMN=N1,
SQUEEZE=1.88,
$
ENDSTYLE
END



Damon
WF 7.7.02M LINUX
PMF 5.3.1
HTML, PDF, EXCEL
March 01, 2011, 10:34 AM
Francis Mariani
While I take a look at this, I would still appreciate you editing your original post and put the code between the CODE tags. Look for the icon at the right side of the page, just before Waz's response.


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
March 01, 2011, 10:58 AM
Francis Mariani
TABLE FILE ARDAYSHOLD
SUM 
BENCHMARK_NUM AS 'Target' OVER 
ardays AS 'Actual AR Days'
HEADING
"AR Days"
...
END


It looks like you have a report with one heading line and two detail lines.

I ran a test using the CAR file and got this:



Your issue may have something to do with
ON TABLE SET HTMLCSS ON
which affects more than it should.


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
March 01, 2011, 11:32 AM
Damon
Francis - Yes, it is a simple fex that is then set in a compound Document Composer page. I need to get rid of the extra unwanted space because I have 6-8 fexes per page... It's a kind of KPI style page.

I do have the CSS on - but don't I need that in order for my style sheets to work? I guess I'm not sure what you are telling me.


Damon
WF 7.7.02M LINUX
PMF 5.3.1
HTML, PDF, EXCEL
March 01, 2011, 12:24 PM
Francis Mariani
I'm telling you that the command
ON TABLE SET HTMLCSS ON
adds that extra row after the header, and thousands have fidgeted with it with varying degrees of success. I would not turn it on. Turning it on creates those .x3, .x4, .x2 CSS classes that some of us hate.

It seems like you're using your own stylesheet, though I've never set a stylesheet with a command like this:
INCLUDE = endeflt,

Since this is an HTML report, I would style it with my own CSS classes, e.g.:
TYPE=DATA, COLUMN=N1, CLASS=data1, $
TYPE=TITLE, CLASS=column_title, $
TYPE=HEADING, LINE=1, CLASS=heading1, $
etc

data1, column_title, heading1 would be classes in a CSS stylesheet, but I'm not sure how to incorporate this into a Document Composer fex, it's probably an option in the Style area of the GUI tool.


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
March 01, 2011, 12:25 PM
Francis Mariani
I'd still like you to fix your original posting, just so I can sleep easier tonight. Smiler


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
March 01, 2011, 01:19 PM
Damon
Thanks for the detail. I tried to fix the orignal, but it would not stick. I will try again. Thanks for your patience.


Damon
WF 7.7.02M LINUX
PMF 5.3.1
HTML, PDF, EXCEL
March 01, 2011, 01:27 PM
Damon
OK - I finally fixed all the little things wrong with my original post. Lessons learned - Thanks.

Two things as follow up:

1.
quote:
INCLUDE = endeflt,


Dev Studio puts the above sometimes... I have not been adding that. And since I am new to CCS, I have been leaaving everything there.

2. When I turn CSS OFF - it ignores all the important style stuff that is set out just below there. I guess I am still confused. How do I turn that off, but still maintain the kind of control of styles that I need?


Damon
WF 7.7.02M LINUX
PMF 5.3.1
HTML, PDF, EXCEL
March 04, 2011, 09:41 AM
Damon
Anybody else have any insight on this? Sorry for the long post, but this is really getting me down. Please help. The extra row between the page heading and table of data is particularly problematic.


Damon
WF 7.7.02M LINUX
PMF 5.3.1
HTML, PDF, EXCEL
March 04, 2011, 10:06 AM
Tony A
ON TABLE SET PAGE NOPAGE

instead of ON TABLE SET PAGE NOLEAD should assist you a little?

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
March 05, 2011, 12:15 PM
Damon
Yes - I am using NOLEAD already. It help with the space on top when there is no heading, but once you add a heading, the extra line is added between the heading and the table.... and then there is the extra line after, we well. I could live with that one, but I must get rid of the extra row between the page heading and the table of data.

Someone HELP!


Damon
WF 7.7.02M LINUX
PMF 5.3.1
HTML, PDF, EXCEL
March 06, 2011, 03:52 PM
Waz
If all else fails, you could always use javascript to remove the unwanted lines.


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!

March 06, 2011, 04:00 PM
Waz
Another thought if all else fails ...

By adding your own style after the report you can override the ones generated in WebFOCUS.

-*new file
TABLE FILE CAR
SUM 
SEATS AS 'Target' OVER 
MPG AS 'Actual AR Days'
HEADING
"AR Days"
ON TABLE SET PAGE-NUM NOLEAD 
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
-*INCLUDE = endeflt,$
LEFTMARGIN=0.000000,
RIGHTMARGIN=0.000000,
TOPMARGIN=0.000000,
BOTTOMMARGIN=0.000000,
$
TYPE=DATA,
COLUMN=N2,
BORDER-TOP=LIGHT,
BORDER-BOTTOM=LIGHT,
BORDER-LEFT=LIGHT,
BORDER-RIGHT=LIGHT,
BORDER-TOP-COLOR=RGB(18 72 124),
BORDER-BOTTOM-COLOR=RGB(18 72 124),
BORDER-LEFT-COLOR=RGB(18 72 124),
BORDER-RIGHT-COLOR=RGB(18 72 124),
FONT='CALIBRI',
SIZE=11,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
JUSTIFY=RIGHT,
$
TYPE=DATA,
COLUMN=N1,
BORDER-TOP=LIGHT,
BORDER-BOTTOM=LIGHT,
BORDER-LEFT=LIGHT,
BORDER-RIGHT=LIGHT,
BORDER-TOP-COLOR=RGB(18 72 124),
BORDER-BOTTOM-COLOR=RGB(18 72 124),
BORDER-LEFT-COLOR=RGB(18 72 124),
BORDER-RIGHT-COLOR=RGB(18 72 124),
FONT='CALIBRI',
SIZE=11,
COLOR='BLACK',
BACKCOLOR='NONE',
JUSTIFY=RIGHT,
$
TYPE=TITLE,
COLUMN=N2,
FONT='CALIBRI',
SIZE=11,
BACKCOLOR=RGB(18 72 124),
JUSTIFY=LEFT,
$
TYPE=TITLE,
COLUMN=N1,
FONT='CALIBRI',
SIZE=11,
BACKCOLOR=RGB(18 72 124),
JUSTIFY=LEFT,
$
TYPE=HEADING,
LINE=1,
JUSTIFY=LEFT,
$
TYPE=HEADING,
LINE=1,
OBJECT=TEXT,
ITEM=1,
FONT='CALIBRI',
SIZE=11,
COLOR=RGB(18 72 124),
STYLE=BOLD+UNDERLINE,
$
TYPE=REPORT,
COLUMN=N2,
SQUEEZE=1.88,
$
TYPE=REPORT,
COLUMN=N1,
SQUEEZE=1.88,
$
ENDSTYLE
END
-RUN
-HTMLFORM BEGIN
<STYLE TYPE="text/css">
<!--
.x1 {font-size:1px}
.x7 {display:none;}
</STYLE>
-HTMLFORM END



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!

March 10, 2011, 03:28 PM
Damon
Waz - you are the second person to suggest that I use my own style sheet. I would love some more details about that. I was under the impression that I was already using my own style sheet, ... and when I comment out the reference to
  -*INCLUDE = endeflt,$
- it does not change the issue that I am having. I still get the extra row between the heading and the table with a
 <TR> 'non breaking space' </TR> 
in it.

What am I missing. What does it mean to have my own style sheet that I am not arleady doing?

Thanks to all who have tried to help.


Damon
WF 7.7.02M LINUX
PMF 5.3.1
HTML, PDF, EXCEL
March 10, 2011, 05:38 PM
Waz
Did you notice the small piece of code at the bottom.
-HTMLFORM BEGIN
<STYLE TYPE="text/css">
<!--
.x1 {font-size:1px}
.x7 {display:none;}
</STYLE>
-HTMLFORM END



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!

March 11, 2011, 09:55 AM
Damon
Waz,

Thanks. I had not noticed it. I did test it but, but unfortunately, becuase I am placing several different procedures on a single document composer page, the end result using this technique causes the individual HTML pieces that are generated to conflict. It does not work.

What I really need is a solution that will work to prevent the report server from creating the unwanted and unrequested rows to begin with.

Thanks for trying. I think I need to open a trouble ticket. Do you agree?


Damon
WF 7.7.02M LINUX
PMF 5.3.1
HTML, PDF, EXCEL
March 11, 2011, 10:01 AM
Francis Mariani
Damon,

If you have the time, could you please create a document composer report that mimics yours, with multiple procedures, using one of the WebFOCUS-supplied demo files, CAR, GGORDER, CENTORD, etc. If you post this code we may be able to help. This fex would also be good for your Tech Support case.


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
March 11, 2011, 10:13 AM
Damon
Thanks Francis. I am on deadline for Monday - but I will do this as soon as I can. Good idea. Thanks!


Damon
WF 7.7.02M LINUX
PMF 5.3.1
HTML, PDF, EXCEL
March 15, 2011, 04:04 PM
Damon
This is the problem set out using the CAR file, at Francis' request.

There are two issues:
1. The extra row between the "Page Heading" and the table of data.
2. The extra space under the column titles - this does not happen when you run the individual fex. It only happens in the Composer Page.

Do you think I need to open a ticket for a bug fix for either of these?

Below is the Doc Composer Page code, followed by the code for each of the three example FEXs that I placed on the Doc Composer Page.

  
-* File Layout_Example
-* Default Mode: ResourceLayout
SET HTMLARCHIVE=ON
COMPOUND LAYOUT PCHOLD FORMAT DHTML
UNITS=IN, $
SECTION=section1, LAYOUT=ON, METADATA='.1^.1^.1^.1^4', MERGE=OFF, ORIENTATION=LANDSCAPE, PAGESIZE=Letter, SHOW_GLOBALFILTER=OFF, $
PAGELAYOUT=1, NAME='Layout Example for Francis', text='Extra Unwanted Rows', TOC-LEVEL=1, BOTTOMMARGIN=.1, TOPMARGIN=.1, ORIENTATION=LANDSCAPE, METADATA='BOTTOMMARGIN=.1,TOPMARGIN=.1,LEFTMARGIN=0,RIGHTMARGIN=0,ORIENTATION=LANDSCAPE,', $
OBJECT=STRING, NAME='Description of Problem', TEXT='<B><FONT face="ARIAL "></FONT></B><FONT face="ARIAL ">This is a page containing 3 fex examples. There are now two spacing issues:<BR>1.  The extra lines between the Page Heading and the Table of data.<BR>2. The extra space under the column titles. If you run the FEXs individually, this space does not happen.<BR><BR>Thank you Francis et al.</FONT><B><FONT face="ARIAL "><FONT face="ARIAL "></FONT></FONT></B>', POSITION=(0.135 0.150), MARKUP=ON, WRAP=ON, DIMENSION=(8.000 1.000),  color=RGB(0 0 0),   METADATA='', $
COMPONENT='Dealer Cost', TEXT='Dealer Cost', TOC-LEVEL=2, POSITION=(0.150 1.250), DIMENSION=(* *), METADATA='Z-INDEX: 100; LEFT: 0.15in; WIDTH: 3.4in; POSITION: absolute; TOP: 1.25in; HEIGHT: 1.2in', $
COMPONENT='Retail Cost', TEXT='Retail Cost', TOC-LEVEL=2, POSITION=(0.150 2.500), DIMENSION=(* *), METADATA='Z-INDEX: 100; LEFT: 0.15in; WIDTH: 3.4in; POSITION: absolute; TOP: 2.5in; HEIGHT: 1.2in', $
COMPONENT='Sales', TEXT='Sales', TOC-LEVEL=2, POSITION=(0.150 3.800), DIMENSION=(3.400 1.200), METADATA='Z-INDEX: 100; LEFT: 0.15in; WIDTH: 3.4in; POSITION: absolute; TOP: 3.8in; HEIGHT: 1.2in', $
END
SET COMPONENT='Dealer Cost'
-*component_type report
-INCLUDE comp1.fex
SET COMPONENT='Retail Cost'
-*component_type report
-INCLUDE comp2.fex
SET COMPONENT='Sales'
-*component_type report
-INCLUDE comp3.fex
COMPOUND END



-* File comp1.fex
TABLE FILE CAR
SUM
     DEALER_COST/D7CM AS 'Dealer Cost'
BY  BODYTYPE AS 'Type'
HEADING
"Dealer Cost Example"
WHERE BODYTYPE EQ 'ROADSTER';
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
$
TYPE=DATA,
     COLUMN=N1,
     BORDER-TOP=LIGHT,
     BORDER-BOTTOM=LIGHT,
     BORDER-LEFT=LIGHT,
     BORDER-RIGHT=LIGHT,
     BORDER-TOP-COLOR=RGB(18 72 124),
     BORDER-BOTTOM-COLOR=RGB(18 72 124),
     BORDER-LEFT-COLOR=RGB(18 72 124),
     BORDER-RIGHT-COLOR=RGB(18 72 124),
     FONT='ARIAL',
     SIZE=8,
     COLOR='BLACK',
     BACKCOLOR='NONE',
$
TYPE=DATA,
     COLUMN=N2,
     BORDER-TOP=LIGHT,
     BORDER-BOTTOM=LIGHT,
     BORDER-LEFT=LIGHT,
     BORDER-RIGHT=LIGHT,
     BORDER-TOP-COLOR=RGB(18 72 124),
     BORDER-BOTTOM-COLOR=RGB(18 72 124),
     BORDER-LEFT-COLOR=RGB(18 72 124),
     BORDER-RIGHT-COLOR=RGB(18 72 124),
     FONT='ARIAL',
     SIZE=8,
     COLOR='BLACK',
     BACKCOLOR='NONE',
$
TYPE=TITLE,
     COLUMN=N1,
     FONT='ARIAL',
     SIZE=8,
     COLOR='WHITE',
     BACKCOLOR=RGB(18 72 124),
     STYLE=BOLD,
$
TYPE=TITLE,
     COLUMN=N2,
     FONT='ARIAL',
     SIZE=8,
     COLOR='WHITE',
     BACKCOLOR=RGB(18 72 124),
     STYLE=BOLD,
$
TYPE=HEADING,
     LINE=1,
     OBJECT=TEXT,
     ITEM=1,
     FONT='ARIAL',
     SIZE=9,
     COLOR=RGB(18 72 124),
     STYLE=BOLD,
$
TYPE=REPORT,
     COLUMN=N1,
     SQUEEZE=1.500000,
$
TYPE=REPORT,
     COLUMN=N2,
     SQUEEZE=1.500000,
$
ENDSTYLE
END


-* File comp2.fex
TABLE FILE CAR
SUM
     RETAIL_COST/D7CM AS 'Retail Cost'
BY  BODYTYPE AS 'Type'
HEADING
"Retail Cost Example"
WHERE BODYTYPE EQ 'ROADSTER';
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
$
TYPE=DATA,
     COLUMN=N1,
     BORDER-TOP=LIGHT,
     BORDER-BOTTOM=LIGHT,
     BORDER-LEFT=LIGHT,
     BORDER-RIGHT=LIGHT,
     BORDER-TOP-COLOR=RGB(18 72 124),
     BORDER-BOTTOM-COLOR=RGB(18 72 124),
     BORDER-LEFT-COLOR=RGB(18 72 124),
     BORDER-RIGHT-COLOR=RGB(18 72 124),
     FONT='ARIAL',
     SIZE=8,
     COLOR='BLACK',
     BACKCOLOR='NONE',
$
TYPE=DATA,
     COLUMN=N2,
     BORDER-TOP=LIGHT,
     BORDER-BOTTOM=LIGHT,
     BORDER-LEFT=LIGHT,
     BORDER-RIGHT=LIGHT,
     BORDER-TOP-COLOR=RGB(18 72 124),
     BORDER-BOTTOM-COLOR=RGB(18 72 124),
     BORDER-LEFT-COLOR=RGB(18 72 124),
     BORDER-RIGHT-COLOR=RGB(18 72 124),
     FONT='ARIAL',
     SIZE=8,
     COLOR='BLACK',
     BACKCOLOR='NONE',
$
TYPE=TITLE,
     COLUMN=N1,
     FONT='ARIAL',
     SIZE=8,
     COLOR='WHITE',
     BACKCOLOR=RGB(18 72 124),
     STYLE=BOLD,
$
TYPE=TITLE,
     COLUMN=N2,
     FONT='ARIAL',
     SIZE=8,
     COLOR='WHITE',
     BACKCOLOR=RGB(18 72 124),
     STYLE=BOLD,
$
TYPE=HEADING,
     LINE=1,
     OBJECT=TEXT,
     ITEM=1,
     FONT='ARIAL',
     SIZE=9,
     COLOR=RGB(18 72 124),
     STYLE=BOLD,
$
TYPE=REPORT,
     COLUMN=N1,
     SQUEEZE=1.500000,
$
TYPE=REPORT,
     COLUMN=N2,
     SQUEEZE=1.500000,
$
ENDSTYLE
END


-* File comp3.fex
TABLE FILE CAR
SUM
     SALES/D7CM AS 'Sales'
BY  BODYTYPE AS 'Type'
HEADING
"Sales Example"
WHERE BODYTYPE EQ 'ROADSTER';
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
$
TYPE=DATA,
     COLUMN=N1,
     BORDER-TOP=LIGHT,
     BORDER-BOTTOM=LIGHT,
     BORDER-LEFT=LIGHT,
     BORDER-RIGHT=LIGHT,
     BORDER-TOP-COLOR=RGB(18 72 124),
     BORDER-BOTTOM-COLOR=RGB(18 72 124),
     BORDER-LEFT-COLOR=RGB(18 72 124),
     BORDER-RIGHT-COLOR=RGB(18 72 124),
     FONT='ARIAL',
     SIZE=8,
     COLOR='BLACK',
     BACKCOLOR='NONE',
$
TYPE=DATA,
     COLUMN=N2,
     BORDER-TOP=LIGHT,
     BORDER-BOTTOM=LIGHT,
     BORDER-LEFT=LIGHT,
     BORDER-RIGHT=LIGHT,
     BORDER-TOP-COLOR=RGB(18 72 124),
     BORDER-BOTTOM-COLOR=RGB(18 72 124),
     BORDER-LEFT-COLOR=RGB(18 72 124),
     BORDER-RIGHT-COLOR=RGB(18 72 124),
     FONT='ARIAL',
     SIZE=8,
     COLOR='BLACK',
     BACKCOLOR='NONE',
$
TYPE=TITLE,
     COLUMN=N1,
     FONT='ARIAL',
     SIZE=8,
     COLOR='WHITE',
     BACKCOLOR=RGB(18 72 124),
     STYLE=BOLD,
$
TYPE=TITLE,
     COLUMN=N2,
     FONT='ARIAL',
     SIZE=8,
     COLOR='WHITE',
     BACKCOLOR=RGB(18 72 124),
     STYLE=BOLD,
$
TYPE=HEADING,
     LINE=1,
     OBJECT=TEXT,
     ITEM=1,
     FONT='ARIAL',
     SIZE=9,
     COLOR=RGB(18 72 124),
     STYLE=BOLD,
$
TYPE=REPORT,
     COLUMN=N1,
     SQUEEZE=1.500000,
$
TYPE=REPORT,
     COLUMN=N2,
     SQUEEZE=1.500000,
$
ENDSTYLE
END




Looking forward to an easy fix! ! ! Smiler

Thanks to all for taking the time.


Damon
WF 7.7.02M LINUX
PMF 5.3.1
HTML, PDF, EXCEL
March 21, 2011, 12:11 PM
Damon
Hi all. I posted the CAR file example about a week ago (See previous post) --- any ideas? If not, do you think I would be justified in opening a bug ticket?


Damon
WF 7.7.02M LINUX
PMF 5.3.1
HTML, PDF, EXCEL
March 21, 2011, 01:12 PM
Francis Mariani
Damon, if no one else does, I'll look into this when I get access to my 7.7 environment, later today...


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
March 21, 2011, 04:16 PM
Damon
Thank you Francis... no takers so far.

I look forward to your response.

Curious... does this not happen in your 7.6.8 environment?

Damon


Damon
WF 7.7.02M LINUX
PMF 5.3.1
HTML, PDF, EXCEL
March 22, 2011, 12:00 AM
Francis Mariani
Damon, this most surely happens in v7.6.8 as well, but I wanted to make sure I was testing your example in the same environment as you.

I see the problems and the space between the heading and the data table problem is long running - been there since they added the HTMLCSS setting (eons ago). I would open a case about the second one - the compound report's column titles have underlines, that's what's causing the extra space. Run the individual report - no underline for the column title - can't explain why.

If your report needs to be in HTML format only, and you're not using other aspects of Compound Layout, consider this example that creates all three data tables in one fex and displays then within a HTMLFORM. The HEADINGs are removed from the reports and included in the HTMLFORM. This eliminates the two issues you brought up, but does not eliminate another issue - there is a blank line at the end of each data table and I don't know how to get rid of those, other than not using HTMLCSS=ON. Turning HTMLCSS to OFF eliminates all these problems, though it's complicated applying a borer around each cell in a table.

Example:

-* File damon_compound2.fex

SET PAGE-NUM=NOLEAD
-RUN

-* Part 1
TABLE FILE CAR
SUM
     DEALER_COST/D7CM AS 'Dealer Cost'
BY  BODYTYPE AS 'Type'
WHERE BODYTYPE EQ 'ROADSTER';
ON TABLE NOTOTAL
ON TABLE HOLD AS H001 FORMAT HTMTABLE
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
$
TYPE=DATA,
     COLUMN=N1,
       BORDER=1, 
       BORDER-COLOR=RGB(18 72 124),
     FONT='ARIAL',
     SIZE=8,
     COLOR='BLACK',
     BACKCOLOR='NONE',
$
TYPE=DATA,
     COLUMN=N2,
       BORDER=1, 
       BORDER-COLOR=RGB(18 72 124),
     FONT='ARIAL',
     SIZE=8,
     COLOR='BLACK',
     BACKCOLOR='NONE',
$
TYPE=TITLE,
     COLUMN=N1,
     FONT='ARIAL',
     SIZE=8,
     COLOR='WHITE',
     BACKCOLOR=RGB(18 72 124),
     STYLE=BOLD,
$
TYPE=TITLE,
     COLUMN=N2,
     FONT='ARIAL',
     SIZE=8,
     COLOR='WHITE',
     BACKCOLOR=RGB(18 72 124),
     STYLE=BOLD,
$
TYPE=HEADING,
     LINE=1,
     OBJECT=TEXT,
     ITEM=1,
     FONT='ARIAL',
     SIZE=9,
     COLOR=RGB(18 72 124),
     STYLE=BOLD,
$
TYPE=REPORT,
     COLUMN=N1,
     SQUEEZE=1.500000,
$
TYPE=REPORT,
     COLUMN=N2,
     SQUEEZE=1.500000,
$
ENDSTYLE
END


-* Part 2
TABLE FILE CAR
SUM
     RETAIL_COST/D7CM AS 'Retail Cost'
BY  BODYTYPE AS 'Type'
WHERE BODYTYPE EQ 'ROADSTER';
ON TABLE NOTOTAL
ON TABLE HOLD AS H002 FORMAT HTMTABLE
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
$
TYPE=DATA,
     COLUMN=N1,
       BORDER=1, 
       BORDER-COLOR=RGB(18 72 124),
     FONT='ARIAL',
     SIZE=8,
     COLOR='BLACK',
     BACKCOLOR='NONE',
$
TYPE=DATA,
     COLUMN=N2,
       BORDER=1, 
       BORDER-COLOR=RGB(18 72 124),
     FONT='ARIAL',
     SIZE=8,
     COLOR='BLACK',
     BACKCOLOR='NONE',
$
TYPE=TITLE,
     COLUMN=N1,
     FONT='ARIAL',
     SIZE=8,
     COLOR='WHITE',
     BACKCOLOR=RGB(18 72 124),
     STYLE=BOLD,
$
TYPE=TITLE,
     COLUMN=N2,
     FONT='ARIAL',
     SIZE=8,
     COLOR='WHITE',
     BACKCOLOR=RGB(18 72 124),
     STYLE=BOLD,
$
TYPE=HEADING,
     LINE=1,
     OBJECT=TEXT,
     ITEM=1,
     FONT='ARIAL',
     SIZE=9,
     COLOR=RGB(18 72 124),
     STYLE=BOLD,
$
TYPE=REPORT,
     COLUMN=N1,
     SQUEEZE=1.500000,
$
TYPE=REPORT,
     COLUMN=N2,
     SQUEEZE=1.500000,
$
ENDSTYLE
END


-* Part 3
TABLE FILE CAR
SUM
     SALES/D7CM AS 'Sales'
BY  BODYTYPE AS 'Type'
WHERE BODYTYPE EQ 'ROADSTER';
ON TABLE NOTOTAL
ON TABLE HOLD AS H003 FORMAT HTMTABLE
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
$
TYPE=DATA,
     COLUMN=N1,
       BORDER=1, 
       BORDER-COLOR=RGB(18 72 124),
     FONT='ARIAL',
     SIZE=8,
     COLOR='BLACK',
     BACKCOLOR='NONE',
$
TYPE=DATA,
     COLUMN=N2,
       BORDER=1, 
       BORDER-COLOR=RGB(18 72 124),
     FONT='ARIAL',
     SIZE=8,
     COLOR='BLACK',
     BACKCOLOR='NONE',
$
TYPE=TITLE,
     COLUMN=N1,
     FONT='ARIAL',
     SIZE=8,
     COLOR='WHITE',
     BACKCOLOR=RGB(18 72 124),
     STYLE=BOLD,
$
TYPE=TITLE,
     COLUMN=N2,
     FONT='ARIAL',
     SIZE=8,
     COLOR='WHITE',
     BACKCOLOR=RGB(18 72 124),
     STYLE=BOLD,
$
TYPE=HEADING,
     LINE=1,
     OBJECT=TEXT,
     ITEM=1,
     FONT='ARIAL',
     SIZE=9,
     COLOR=RGB(18 72 124),
     STYLE=BOLD,
$
TYPE=REPORT,
     COLUMN=N1,
     SQUEEZE=1.500000,
$
TYPE=REPORT,
     COLUMN=N2,
     SQUEEZE=1.500000,
$
ENDSTYLE
END
-RUN

-HTMLFORM BEGIN
<style>
.heading {
 white-space:nowrap;
 font-family:Arial;
 font-size:9pt;
 font-weight:bold;
 color:#12487C;
 }
</style>

<div class="heading">Dealer Cost Example</div>
<div>
!IBI.FIL.H001;
</div>
<div class="heading">Retail Cost Example</div>
<div>
!IBI.FIL.H002;
</div>
<div class="heading">Sales Example</div>
<div>
!IBI.FIL.H003;
</div>
-HTMLFORM END


For something like this, if it's HTML only, I take things into my own hands:

-* File damon_compound3.fex

SET PAGE-NUM=NOLEAD
-RUN

-* Part 1
TABLE FILE CAR
SUM
     DEALER_COST/D7CM AS 'Dealer Cost'
BY  BODYTYPE AS 'Type'
HEADING
"Dealer Cost Example"
WHERE BODYTYPE EQ 'ROADSTER';
ON TABLE NOTOTAL
ON TABLE HOLD AS H001 FORMAT HTMTABLE
-*ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=REPORT, GRID=ON, $
TYPE=DATA,
     COLUMN=N1,
     CLASS=data,
$
TYPE=DATA,
     COLUMN=N2,
     CLASS=data,
$
TYPE=TITLE,
     COLUMN=N1,
     CLASS=title_col1,
$
TYPE=TITLE,
     COLUMN=N2,
     CLASS=title_col2,
$
TYPE=HEADING,
     CLASS=heading,
$
ENDSTYLE
END


-* Part 2
TABLE FILE CAR
SUM
     RETAIL_COST/D7CM AS 'Retail Cost'
BY  BODYTYPE AS 'Type'
HEADING
"Retail Cost Example"
WHERE BODYTYPE EQ 'ROADSTER';
ON TABLE NOTOTAL
ON TABLE HOLD AS H002 FORMAT HTMTABLE
-*ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=REPORT, GRID=ON, $
TYPE=DATA,
     COLUMN=N1,
     CLASS=data,
$
TYPE=DATA,
     COLUMN=N2,
     CLASS=data,
$
TYPE=TITLE,
     COLUMN=N1,
     CLASS=title_col1,
$
TYPE=TITLE,
     COLUMN=N2,
     CLASS=title_col2,
$
TYPE=HEADING,
     CLASS=heading,
$
ENDSTYLE
END


-* Part 3
TABLE FILE CAR
SUM
     SALES/D7CM AS 'Sales'
BY  BODYTYPE AS 'Type'
HEADING
"Sales Example"
WHERE BODYTYPE EQ 'ROADSTER';
ON TABLE NOTOTAL
ON TABLE HOLD AS H003 FORMAT HTMTABLE
-*ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=REPORT, GRID=ON, $
TYPE=DATA,
     COLUMN=N1,
     CLASS=data,
$
TYPE=DATA,
     COLUMN=N2,
     CLASS=data,
$
TYPE=TITLE,
     COLUMN=N1,
     CLASS=title_col1,
$
TYPE=TITLE,
     COLUMN=N2,
     CLASS=title_col2,
$
TYPE=HEADING,
     CLASS=heading,
$
ENDSTYLE
END
-RUN

-HTMLFORM BEGIN
<style>
@media screen {
 .spacer { height:612pt; }
}
@media print {
 .spacer { }
}

body
{
font-family:Arial;
font-size: 9pt;
}

table
{
border-collapse: collapse;
}

td
{
font-size: 8pt;
}

.heading
{
white-space: nowrap;
font-family: Arial, sans-serif;
font-size: 9pt;
font-weight: bold;
color: #12487C;
padding-left: 10px;
padding-right: 10px;
}

.data
{
white-space: nowrap;
padding-left: 10px;
padding-right: 10px;
}
.title_col1
{
white-space: nowrap;
font-size: 9pt;
font-weight: bold;
color: #FFFFFF;
background-color: #12487C;
width:126pt;
padding-left: 10px;
padding-right: 10px;
}

.title_col2
{
white-space: nowrap;
font-size: 9pt;
font-weight: bold;
color: #FFFFFF;
background-color: #12487C;
width:117pt;
padding-left: 10px;
padding-right: 10px;
}

</style>

!IBI.FIL.H001;
!IBI.FIL.H002;
!IBI.FIL.H003;
-HTMLFORM END

Note, none of the above code is compatible with the GUI tools in Dev Studio or MRE and that's the beauty of it.


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
March 23, 2011, 12:34 PM
Damon
Francis,

Thank you. My initial look at your solution shows that it works, as you said, in a straight forward HTML environment. I have no issue going back and forth with GUI and Code...

However, I will need to use Document Composer - so I will test that now. My output will be both HTML and PDF.

If that changes anything regarding your approach, let me know. I will get back soon with the results of my testing.

Damon


Damon
WF 7.7.02M LINUX
PMF 5.3.1
HTML, PDF, EXCEL
March 23, 2011, 01:00 PM
Francis Mariani
My approach works for HTML only as it inserts HTMTABLE HOLD files with a -HTMLFORM. The problem lies in the HTML styling - certain settings do more than they suggest they should do.

For example, GRID and HTMLCSS:

TABLE FILE CAR
SUM
SALES
BY COUNTRY
HEADING
"THIS IS A HEADING"
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
TYPE=REPORT, GRID=ON, $
ENDSTYLE
END

The HTML table grid is on but the column-title underline is off. No space between heading and body.

TABLE FILE CAR
SUM
SALES
BY COUNTRY
HEADING
"THIS IS A HEADING"
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
TYPE=REPORT, GRID=OFF, $
ENDSTYLE
END

The HTML table grid is off but the column-title underline is on. No space between heading and body.

TABLE FILE CAR
SUM
SALES
BY COUNTRY
HEADING
"THIS IS A HEADING"
ON TABLE SET PAGE NOLEAD
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=REPORT, SQUEEZE=ON, GRID=ON,
FONT='ARIAL', SIZE=8,
BORDER=1, BORDER-COLOR=SILVER,
$
END

Grid is on, nicely styled, but the column-title underline is off. Space between heading and body.

TABLE FILE CAR
SUM
SALES
BY COUNTRY
HEADING
"THIS IS A HEADING"
ON TABLE SET PAGE NOLEAD
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=REPORT, SQUEEZE=ON, GRID=OFF,
FONT='ARIAL', SIZE=8,
BORDER=1, BORDER-COLOR=SILVER,
$
END

Grid is on, nicely styled as before, but the column-title underline is on. Space between heading and body.

Why GRID affects column-titles has never been explained.
Why HTML CSS affects the space between the heading and body has never been explained.


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