I have created a report that has some busy text in the header / subhead area. I want to display a title "...FEE" over the columns and have a border (box) wrapped around it.
Originally posted by Tomsweb: I have created a report that has some busy text in the header / subhead area. I want to display a title "...FEE" over the columns and have a border (box) wrapped around it.
Can you post a repro with one of the sample files ?
What is the output format of the report.
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 08, 2020, 02:54 PM
Danny-SRL
Tom, I couldn't find a way to style a border for a specific line in a heading. I then tried to demote the second line of your TABHEADING to a SUBHEAD. Here is what I came up with (I'll try to play around with the idea a bit more):
DEFINE FILE CAR
SP/A1=' ';
END
TABLE FILE CAR
SUM
CAR.BODY.DEALER_COST AS ''
CAR.BODY.RETAIL_COST AS ''
CAR.BODY.SALES AS ''
BY SP NOPRINT
BY CAR.ORIGIN.COUNTRY AS ''
ON SP SUBHEAD
"The base rate is<TOT.DEALER_COST<TOT.RETAIL_COST<TOT.SALES"
" "
"COUNTRY<+0>DEALER COST<+0>RETAIL COST<+0>SALES"
ON TABLE SUBHEAD
"INTCH/OTHER FEE SUMMARY"
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 = warm,
$
TYPE=TABHEADING,
BORDER-TOP=LIGHT,
BORDER-BOTTOM=LIGHT,
BORDER-LEFT=LIGHT,
BORDER-RIGHT=LIGHT,
BORDER-TOP-COLOR='BLACK',
BORDER-BOTTOM-COLOR='BLACK',
BORDER-LEFT-COLOR='BLACK',
BORDER-RIGHT-COLOR='BLACK',
$
TYPE=TABHEADING,
LINE=1,
OBJECT=TEXT,
ITEM=1,
WIDTH=5.125,
$
TYPE=SUBHEAD,
BY=1,
HEADALIGN=BODY,
BORDER-TOP=OFF,
$
TYPE=SUBHEAD,
BY=1,
LINE=1,
OBJECT=TEXT,
ITEM=1,
JUSTIFY=LEFT,
WIDTH=1.000,
$
TYPE=SUBHEAD,
BY=1,
LINE=1,
OBJECT=FIELD,
ITEM=1,
JUSTIFY=RIGHT,
WIDTH=1.000,
$
TYPE=SUBHEAD,
BY=1,
LINE=1,
OBJECT=FIELD,
ITEM=2,
JUSTIFY=RIGHT,
WIDTH=1.000,
$
TYPE=SUBHEAD,
BY=1,
LINE=1,
OBJECT=FIELD,
ITEM=3,
JUSTIFY=RIGHT,
WIDTH=1.000,
$
TYPE=SUBHEAD,
BY=1,
LINE=2,
BACKCOLOR=WHITE,
$
TYPE=SUBHEAD,
BY=1,
LINE=3,
BACKCOLOR=WHITE,
$
TYPE=SUBHEAD,
BY=1,
LINE=3,
OBJECT=TEXT,
ITEM=1,
STYLE=BOLD,
JUSTIFY=LEFT,
WIDTH=1.000,
$
TYPE=SUBHEAD,
BY=1,
LINE=3,
OBJECT=TEXT,
ITEM=2,
STYLE=BOLD,
JUSTIFY=RIGHT,
WIDTH=1.000,
$
TYPE=SUBHEAD,
BY=1,
LINE=3,
OBJECT=TEXT,
ITEM=3,
STYLE=BOLD,
JUSTIFY=RIGHT,
WIDTH=1.000,
$
TYPE=SUBHEAD,
BY=1,
LINE=3,
OBJECT=TEXT,
ITEM=4,
STYLE=BOLD,
JUSTIFY=RIGHT,
WIDTH=1.000,
$
ENDSTYLE
END
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
March 09, 2020, 01:37 AM
Danny-SRL
My previous example was a bit quick and didn't take into account the possibility of a report with more than 1 page. Following is a further example. Of course it would be much easier if WF allowed border per line of HEAD be it HEADING, TABHEADING or SUBHEAD...
DEFINE FILE CAR
SP/A1=' ';
END
TABLE FILE CAR
SUM
CAR.BODY.DEALER_COST AS ''
CAR.BODY.RETAIL_COST AS ''
CAR.BODY.SALES AS ''
COMPUTE LL/I5=LAST LL + 1; NOPRINT
BY SP NOPRINT
BY CAR.ORIGIN.COUNTRY AS ''
BY CAR AS ''
ON COUNTRY PAGE-BREAK
ON SP SUBHEAD
"The base rate is<+0> <TOT.DEALER_COST<TOT.RETAIL_COST<TOT.SALES"
" "
"COUNTRY<+0>CAR<+0>DEALER COST<+0>RETAIL COST<+0>SALES"
" "
HEADING
"COUNTRY<+0>CAR<+0>DEALER COST<+0>RETAIL COST<+0>SALES"
WHEN LL GT 1;
ON TABLE SUBHEAD
"INTCH/OTHER FEE SUMMARY"
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 = warm,
$
TYPE=HEADING,
HEADALIGN=BODY,
SIZE=9,
STYLE=BOLD,
COLOR=BLACK,
$
TYPE=HEADING,
OBJECT=TEXT,
ITEM=1,
JUSTIFY=LEFT,
WIDTH=1.000,
$
TYPE=HEADING,
OBJECT=TEXT,
ITEM=2,
JUSTIFY=LEFT,
WIDTH=1.000,
$
TYPE=HEADING,
OBJECT=TEXT,
ITEM=3,
JUSTIFY=RIGHT,
WIDTH=1.000,
$
TYPE=HEADING,
OBJECT=TEXT,
ITEM=4,
JUSTIFY=RIGHT,
WIDTH=1.000,
$
TYPE=HEADING,
OBJECT=TEXT,
ITEM=5,
JUSTIFY=RIGHT,
WIDTH=1.000,
$
TYPE=TABHEADING,
BORDER-TOP=LIGHT,
BORDER-BOTTOM=LIGHT,
BORDER-LEFT=LIGHT,
BORDER-RIGHT=LIGHT,
BORDER-TOP-COLOR='BLACK',
BORDER-BOTTOM-COLOR='BLACK',
BORDER-LEFT-COLOR='BLACK',
BORDER-RIGHT-COLOR='BLACK',
$
TYPE=TABHEADING,
LINE=1,
OBJECT=TEXT,
ITEM=1,
WIDTH=5.125,
$
TYPE=SUBHEAD,
BY=1,
HEADALIGN=BODY,
BORDER-TOP=OFF,
$
TYPE=SUBHEAD,
BY=1,
LINE=1,
OBJECT=TEXT,
ITEM=1,
JUSTIFY=LEFT,
WIDTH=1.000,
$
TYPE=SUBHEAD,
BY=1,
LINE=1,
OBJECT=FIELD,
ITEM=1,
JUSTIFY=RIGHT,
WIDTH=1.000,
$
TYPE=SUBHEAD,
BY=1,
LINE=1,
OBJECT=FIELD,
ITEM=2,
JUSTIFY=RIGHT,
WIDTH=1.000,
$
TYPE=SUBHEAD,
BY=1,
LINE=1,
OBJECT=FIELD,
ITEM=3,
JUSTIFY=RIGHT,
WIDTH=1.000,
$
TYPE=SUBHEAD,
BY=1,
LINE=2,
BACKCOLOR=WHITE,
$
TYPE=SUBHEAD,
BY=1,
LINE=3,
BACKCOLOR=WHITE,
$
TYPE=SUBHEAD,
BY=1,
LINE=4,
BACKCOLOR=WHITE,
$
TYPE=SUBHEAD,
BY=1,
LINE=3,
OBJECT=TEXT,
ITEM=1,
STYLE=BOLD,
JUSTIFY=LEFT,
WIDTH=1.000,
$
TYPE=SUBHEAD,
BY=1,
LINE=3,
OBJECT=TEXT,
ITEM=2,
STYLE=BOLD,
JUSTIFY=LEFT,
WIDTH=1.000,
$
TYPE=SUBHEAD,
BY=1,
LINE=3,
OBJECT=TEXT,
ITEM=3,
STYLE=BOLD,
JUSTIFY=RIGHT,
WIDTH=1.000,
$
TYPE=SUBHEAD,
BY=1,
LINE=3,
OBJECT=TEXT,
ITEM=4,
STYLE=BOLD,
JUSTIFY=RIGHT,
WIDTH=1.000,
$
TYPE=SUBHEAD,
BY=1,
LINE=3,
OBJECT=TEXT,
ITEM=5,
STYLE=BOLD,
JUSTIFY=RIGHT,
WIDTH=1.000,
$
ENDSTYLE
END
This message has been edited. Last edited by: Danny-SRL,
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
March 10, 2020, 03:42 PM
Tomsweb
Hi Daniel, I have tried your 2nd example and I don't understand the expression:
The COMPUTE numbers the lines of the report. It is used in order to prevent the HEADING to appear on the first page, since it is replaced by the SUBHEAD. The SUBHEAD appears only once because it is linked to the DEFINEd field SP which doesn't change value throughout the report and it is used to show the "second line" of the TABHEADING out of the borders. A bit convoluted, maybe, but it gets the work done, which goes to show that there is always a way with WebFOCUS.
You say you get an error. What is the error? Did you enter the COMPUTE within the scope of a PRINT/SUM verb?
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
March 12, 2020, 09:17 PM
Hallway
Is something like this what you are looking for?
INTCH/OTHER FEE SUMMARY
The base rate is:
1.11
2.22
3.33
COUNTRY
CAR
DEALER_COST
RETAIL_COST
SALES
ENGLAND
JAGUAR
18,621
22,369
12000
JENSEN
14,940
17,850
0
TRIUMPH
4,292
5,100
0
FRANCE
PEUGEOT
4,631
5,610
0
ITALY
ALFA ROMEO
16,235
19,565
30200
MASERATI
25,000
31,500
0
JAPAN
DATSUN
2,626
3,139
43000
TOYOTA
2,886
3,339
35030
W GERMANY
AUDI
5,063
5,970
7800
BMW
49,500
58,762
80390
Here is the code:
TABLE FILE CAR
SUM
DEALER_COST
RETAIL_COST
SALES
COMPUTE CARD1/D12.2 = 1.11; NOPRINT
COMPUTE CARD2/D12.2 = 2.22; NOPRINT
COMPUTE CARD3/D12.2 = 3.33; NOPRINT
BY COUNTRY
BY CAR
ON TABLE SUBHEAD
"INTCH/OTHER FEE SUMMARY"
"The base rate is:<CARD1<CARD2<CARD3"
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE HOLD FORMAT HTMTABLE
ON TABLE SET STYLE *
-MRNOEDIT INCLUDE=warm.sty, $
TYPE=TABHEADING, HEADALIGN=BODY, JUSTIFY=CENTER, $
TYPE=TABHEADING, LINE=1, ITEM=1, COLSPAN=6, $
TYPE=TABHEADING, LINE=2, SIZE=10, JUSTIFY=CENTER, $
TYPE=TABHEADING, LINE=2, ITEM=1, COLSPAN=2, $
ENDSTYLE
END
-HTMLFORM BEGIN NOEVAL
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Test Document</title>
</head>
<style>
table>tbody>tr:first-child {
border: 1px solid black;
}
</style>
<body>
!IBI.FIL.HOLD;
</body>
</html>
-HTMLFORM END
This message has been edited. Last edited by: Hallway,
Hallway
Prod: 8202M1
Test: 8202M4
Repository:
OS:
Outputs:
March 15, 2020, 04:55 AM
Danny-SRL
Hallway, Your solution is elegant. However, I have an issue with mixing HTML and WF. In my view one should be able to do everything with the code. I know there are some shortcomings which force one to be creative but this should be a signal to IBI to provide features. Using Tom's example, "border" should be accessible for any item in all headings.
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
March 16, 2020, 03:16 PM
Waz
What Hallway is doing is quite valid, its just css, and could be done with CSSURL setting
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, 2020, 04:14 PM
Danny-SRL
I agree that it is valid. It's just that I would prefer WF to do the trick on it's own.
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
March 16, 2020, 04:41 PM
Waz
It can be done in PDF with OBJECT=BOX, just not HTML unless its the whole TABHEADING with BORDER=ON
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, 2020, 08:27 PM
Hallway
quote:
Originally posted by Danny-SRL: I agree that it is valid. It's just that I would prefer WF to do the trick on it's own.
I agree that there are many GREAT tools that WF does provide, and that there probably should be a WF solution for this. This would probably be a good NFR (New Feature Request).
However, there is SO MUCH MORE that you can do with basic HTML, CSS and JS. Not to mention so many more resources on the web to help in these. Fortunately, IBI recognizes this and gives us the tools, like HTMLFORM, JSURL and CSSURL (as Waz mentioned), to be able to use these basic (and sometimes complex) web development tools.
So, I ask... Why go to a buffet, and only eat the mashed potatoes?