Focal Point
[CLOSED] HTML Report: How to put multiple text lines in heading...

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

October 04, 2012, 04:45 PM
Tomsweb
[CLOSED] HTML Report: How to put multiple text lines in heading...
I have coded this little fex to learn how to put an image in the heading of report in HTML FORMAT.

quote:

TABLE FILE MMDB1
SUM COMPUTE COLOGO/A92 = ''; NOPRINT

SUM COMMENT1
COMMENT2
COMMENT3
BY ASSIGNEE SKIP-LINE
BY WO
BY WDC
IF RECORDLIMIT EQ 15
HEADING
" Text next to the heading image "
" "
ON TABLE SET PAGE NOLEAD
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
GRID=OFF, SIZE=9, $
TYPE=HEADING, SIZE=20, STYLE=BOLD, COLOR=RED, $

ENDSTYLE
END



I am having a problem with putting more than 1 line of text in the heading next to the image.
I have searched through focal point to find an example but it seems that PDF reports are
quite popular.

Does anyone have any experience doing this?

Thanks!

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


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
October 04, 2012, 04:57 PM
Waz
Can you edit your post and place the code in the code tags not quote tags


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!

October 04, 2012, 05:21 PM
Tomsweb
 

TABLE FILE MMDB1
SUM COMPUTE COLOGO/A92 = '<img src="http://wsscapps:81/ibi_html/ib_logo.gif" border="0" />'; NOPRINT

SUM COMMENT1
COMMENT2
COMMENT3
BY ASSIGNEE SKIP-LINE
BY WO
BY WDC
IF RECORDLIMIT EQ 15
HEADING
" Text next to the heading image "
" "
ON TABLE SET PAGE NOLEAD
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
GRID=OFF, SIZE=9, $
TYPE=HEADING, SIZE=20, STYLE=BOLD, COLOR=RED, $

ENDSTYLE
END




Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
October 04, 2012, 05:43 PM
Waz
As this is HTML, there are a number of things that can be done.

Try the stylesheet command for images.
TYPE=HEADING, IMAGE=http://localhost:8080/ibi_html/ib_logo.gif, $


Try embedding some HTML in the first heading line.
DEFINE FILE CAR
FIRSTLINE/A1000 = '<TABLE><TR><TD><img src="http://localhost:8080/ibi_html/ib_logo.gif" border="0" /></TD>'
| '<TD>Text next to the heading image<br>Next Line</TD></TR></TABLE>' ;
END
TABLE FILE CAR
SUM SALES
DEALER_COST
RETAIL_COST
BY COUNTRY SKIP-LINE
BY CAR
BY MODEL
IF RECORDLIMIT EQ 15
HEADING
"<FIRSTLINE"
"Second Line"
ON TABLE SET PAGE NOLEAD
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
GRID=OFF, SIZE=9, $
TYPE=HEADING, SIZE=10, STYLE=BOLD, COLOR=RED, $
-*TYPE=HEADING, IMAGE=http://localhost:8080/ibi_html/ib_logo.gif, $
ENDSTYLE
END


There are probably many other ways to achieve this.


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!

October 05, 2012, 04:58 AM
Tony A
As Waz states, "There are probably many other ways to achieve this." and I would be inclined to use the style inclusion of an image as is should not impact lines of heading. So, my preferred method would be this, as the code is easier to read.
TABLE FILE CAR
  SUM SALES
      DEALER_COST
      RETAIL_COST
   BY COUNTRY SKIP-LINE
   BY CAR
   BY MODEL
IF RECORDLIMIT EQ 15
HEADING
" <+0 First Line of Heading"
" <+0 Second Line of Heading"
" <+0 Third Line of Heading"
ON TABLE SET PAGE NOLEAD
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
  GRID=OFF, SIZE=9, $
  TYPE=HEADING, HEADALIGN=BODY, $
  TYPE=HEADING, ITEM=2, COLOR=RED, SIZE=12, $
  TYPE=HEADING, IMAGE=/ibi_html/ib_logo.gif, $
ENDSTYLE
END
-RUN

However, be aware that if your image size is larger than the space taken by the number of rows in your heading, you could get overlap between report content and heading.

Also be aware that syntax such as JUSTIFY, COLPSAN and others are not supported for the image.

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