[CLOSED]Bottom Border to last data row in tabular report
Hi All,
In this given sample code i need to add bottom border line to last data row only ,
it is possible without using java-script in HTMLFORM tag ?
TABLE FILE CAR
SUM
CAR.BODY.SALES
BY CAR.ORIGIN.COUNTRY
BY CAR.COMP.CAR
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,
$
TYPE=DATA,
BORDER-LEFT=LIGHT,
BORDER-RIGHT=LIGHT,
$
TYPE=TITLE,
BORDER-TOP=LIGHT,
BORDER-BOTTOM=LIGHT,
BORDER-LEFT=LIGHT,
BORDER-RIGHT=LIGHT,
$
ENDSTYLE
END
output:-
---------------------------- |COUNTRY | CAR |SALES | ---------------------------- | X | A | 10 | | Y | B | 20 |
Required output:- ---------------------------- |COUNTRY | CAR |SALES | ---------------------------- | X | A | 10 | | Y | B | 20 | ----------------------------This message has been edited. Last edited by: Chaudhary,
You suggestion creates border around all the data. I think that what Chaudhary is looking for is a border around the report as Excel is doing, not at each rows.
Not have found a way yet. Using FOOTING/SUBFOOT creates the line at the end, but with space between the last data line and the footer.
Here a solution, not that elegant, but it does the trick
TABLE FILE CAR
SUM SALES
BY TOTAL COMPUTE DUMMY /A1 = ''; NOPRINT
BY COUNTRY
BY CAR
ON DUMMY SUBTOTAL AS 'Total'
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,
$
TYPE=SUBTOTAL,
BORDER-TOP=LIGHT,
COLOR=WHITE,
BACKCOLOR=WHITE,
$
TYPE=DATA,
BORDER-LEFT=LIGHT,
BORDER-RIGHT=LIGHT,
$
TYPE=TITLE,
BORDER-TOP=LIGHT,
BORDER-BOTTOM=LIGHT,
BORDER-LEFT=LIGHT,
BORDER-RIGHT=LIGHT,
$
ENDSTYLE
END
This message has been edited. Last edited by: MartinY,
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
November 30, 2017, 08:59 AM
Francis Mariani
Though not elegant, Martin's is the best WebFOCUS solution.
I think one of the problems is that there is always a blank table row after the last data row.
Here is another suggestion, though it uses HTMLFORM with CSS:
TABLE FILE CAR
SUM
CAR.BODY.SALES
BY CAR.ORIGIN.COUNTRY
BY CAR.COMP.CAR
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE HOLD AS H001 FORMAT HTMTABLE
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,
$
TYPE=DATA,
BORDER-LEFT=LIGHT,
BORDER-RIGHT=LIGHT,
$
TYPE=TITLE,
BORDER-TOP=LIGHT,
BORDER-BOTTOM=LIGHT,
BORDER-LEFT=LIGHT,
BORDER-RIGHT=LIGHT,
$
ENDSTYLE
END
-RUN
-HTMLFORM BEGIN
<style>table tr:last-child { border-top: 1px solid black; }</style>
!IBI.FIL.H001;
-HTMLFORM 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
November 30, 2017, 09:09 AM
Chaudhary
quote:
Originally posted by MartinY: Babak,
You suggestion creates border around all the data. I think that what Chaudhary is looking for is a border around the report as Excel is doing, not at each rows.
Not have found a way yet. Using FOOTING/SUBFOOT creates the line at the end, but with space between the last data line and the footer.
Here a solution, not that elegant, but it does the trick
TABLE FILE CAR
SUM SALES
BY TOTAL COMPUTE DUMMY /A1 = ''; NOPRINT
BY COUNTRY
BY CAR
ON DUMMY SUBTOTAL AS 'Total'
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,
$
TYPE=SUBTOTAL,
BORDER-TOP=LIGHT,
COLOR=WHITE,
BACKCOLOR=WHITE,
$
TYPE=DATA,
BORDER-LEFT=LIGHT,
BORDER-RIGHT=LIGHT,
$
TYPE=TITLE,
BORDER-TOP=LIGHT,
BORDER-BOTTOM=LIGHT,
BORDER-LEFT=LIGHT,
BORDER-RIGHT=LIGHT,
$
ENDSTYLE
END
Martin this works but has hidden total values and these values appears when you will select(Left click and scroll down to the table output) table last rowThis message has been edited. Last edited by: Chaudhary,
What is your goal ? Have the report displayed on screen as you whish or have a right click/View source TD section the same as on screen ? Why a user would right-click to see the source ? What could be the issue of doing that and not have the exact same "data" (having the hidden total included in the TD section) ?
I'm just trying to understand the whole request because it seems that at the beginning, we've missed some information.
Tks
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
November 30, 2017, 09:42 AM
Tom Flynn
TABLE FILE CAR
SUM
CAR.BODY.SALES
COMPUTE CNTR/I3 = CNTR + 1;
BY CAR.ORIGIN.COUNTRY
BY CAR.COMP.CAR
ON TABLE HOLD
END
-RUN
-SET &XLINES = &LINES;
TABLE FILE HOLD
PRINT
SALES
CNTR NOPRINT
BY COUNTRY
BY CAR
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,
$
TYPE=DATA,
BORDER-LEFT=LIGHT,
BORDER-RIGHT=LIGHT,
$
TYPE=REPORT, BORDER-BOTTOM=LIGHT, WHEN=CNTR EQ &XLINES,$
TYPE=TITLE,
BORDER-TOP=LIGHT,
BORDER-BOTTOM=LIGHT,
BORDER-LEFT=LIGHT,
BORDER-RIGHT=LIGHT,
$
ENDSTYLE
END
-EXIT
Chaudhary, there are times when you have to wrestle WebFOCUS into doing what you want it to. Tom's solution is quite elegant. If you write efficient code, an extra HOLD file shouldn't make a difference in execution time.
Tom, Happy Holidays to you too!
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