Focal Point
[CLOSED]Bottom Border to last data row in tabular report

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

November 30, 2017, 06:22 AM
Chaudhary
[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,


WF Production :- WF:8.0.0.4, 8.1.05 App-studio/Developer Studio(8.1.x) ,
8.2.0.1M , 8.2.0.2 (App-Studio8.2.x),
InfoAssist/+, InfoDiscovery
Output format:-AHTML, PDF, Excel, HTML
Platform:-Windows 7, 8,10
November 30, 2017, 08:09 AM
BabakNYC
Does this work?
  
TYPE=REPORT,
     BORDER-TOP=LIGHT,
     BORDER-BOTTOM=LIGHT,
     BORDER-LEFT=LIGHT,
     BORDER-RIGHT=LIGHT,
$



WebFOCUS 8206, Unix, Windows
November 30, 2017, 08:23 AM
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

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 row

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


WF Production :- WF:8.0.0.4, 8.1.05 App-studio/Developer Studio(8.1.x) ,
8.2.0.1M , 8.2.0.2 (App-Studio8.2.x),
InfoAssist/+, InfoDiscovery
Output format:-AHTML, PDF, Excel, HTML
Platform:-Windows 7, 8,10
November 30, 2017, 09:25 AM
Francis Mariani
Then perhaps the CSS suggestion might work - no JS.


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:31 AM
Chaudhary
quote:
Then perhaps the CSS suggestion might work - no JS.

Francis it means that We don't achieve this using focus style. we need to apply external java-script or CSS ?

I think now ,we should have type = table in latest WF Razzer


WF Production :- WF:8.0.0.4, 8.1.05 App-studio/Developer Studio(8.1.x) ,
8.2.0.1M , 8.2.0.2 (App-Studio8.2.x),
InfoAssist/+, InfoDiscovery
Output format:-AHTML, PDF, Excel, HTML
Platform:-Windows 7, 8,10
November 30, 2017, 09:37 AM
MartinY
Chaudhary,

Let me ask you something :

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



Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
November 30, 2017, 09:50 AM
Francis Mariani
Tom, a code of beauty 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
November 30, 2017, 09:53 AM
Chaudhary
Thanks Tom,

Hold file solution works. But i was looking for the direct solution on main table request itself .

Martin your solution works but when i applied the same my QA team rejected the report . Frowner


WF Production :- WF:8.0.0.4, 8.1.05 App-studio/Developer Studio(8.1.x) ,
8.2.0.1M , 8.2.0.2 (App-Studio8.2.x),
InfoAssist/+, InfoDiscovery
Output format:-AHTML, PDF, Excel, HTML
Platform:-Windows 7, 8,10
November 30, 2017, 10:14 AM
Tom Flynn
Thanks Francis!!!!
Have a Happy Holiday season this year!


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
November 30, 2017, 10:21 AM
Francis Mariani
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
December 04, 2017, 01:25 AM
Chaudhary
Thanks Francis,

Agreed with you and Tom's solution Smiler


WF Production :- WF:8.0.0.4, 8.1.05 App-studio/Developer Studio(8.1.x) ,
8.2.0.1M , 8.2.0.2 (App-Studio8.2.x),
InfoAssist/+, InfoDiscovery
Output format:-AHTML, PDF, Excel, HTML
Platform:-Windows 7, 8,10