Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]How to add left and right spaces in a html report keeping HTMLCSS OFF?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]How to add left and right spaces in a html report keeping HTMLCSS OFF?
 Login/Join
 
Guru
posted
Hi,

Iam using the below car file code and Iam trying to increase the leftgap and rightgap of the data values and also the titles but nothing seems to be working as I have HTMLCSS OFF.
If I turn on HTMLCSS,then Iam able to increase the spacing but that is not what I need.

 DEFINE FILE CAR
FIRST_HEAD1/A20='subhead1';
SECOND_HEAD2/A10='subhead2';
A/A3='';
THIRD_HEAD3/A60='Target';
HEAD1/A15='>10%';
HEAD2/A15='>20%';
HEAD3/A15='>30%';
END

TABLE FILE CAR
PRINT *
WHERE RECORDLIMIT EQ 30
HEADING
"Car heading"
"Source data"
"Data Current as of today"
" "
"<A<FIRST_HEAD1<SECOND_HEAD2<A<THIRD_HEAD3"
"<A<HEAD1<HEAD2<HEAD3"
ON TABLE HOLD AS HOLD_FILE FORMAT HTML
ON TABLE SET PAGE NOLEAD
ON TABLE SET HTMLCSS OFF
ON TABLE SET STYLE *
TYPE=REPORT,SQUEEZE=ON,FONT='ARIAL',SIZE=9,GRID=OFF,BORDER=1.5,TITLETEXT='Car report',$
TYPE=HEADING,HEADALIGN=BODY,$
TYPE=HEADING,LINE=1,JUSTIFY=CENTER,COLSPAN=18,COLOR='BLACK',FONT='ARIAL',SIZE=10,STYLE=BOLD,$
TYPE=HEADING,LINE=2,JUSTIFY=CENTER,COLSPAN=18,COLOR='BLACK',FONT='ARIAL',SIZE=9,STYLE=BOLD+ITALIC,$
TYPE=HEADING,LINE=3,JUSTIFY=CENTER,COLSPAN=18,COLOR='BLACK',FONT='ARIAL',SIZE=9,STYLE=BOLD+ITALIC,$
TYPE=HEADING,LINE=4,COLSPAN=18,COLOR='BLACK',$
TYPE=HEADING,LINE=5,ITEM=1,COLSPAN=3,COLOR='BLACK',$
TYPE=HEADING,LINE=5,ITEM=2,COLSPAN=1,JUSTIFY=CENTER,COLOR='BLACK',FONT='ARIAL',SIZE=9,STYLE=BOLD,BACKCOLOR=RGB(210 210 210),$
TYPE=HEADING,LINE=5,ITEM=3,COLSPAN=1,JUSTIFY=CENTER,COLOR='BLACK',FONT='ARIAL',SIZE=9,STYLE=BOLD,BACKCOLOR=RGB(210 210 210),$
TYPE=HEADING,LINE=5,ITEM=4,COLSPAN=6,JUSTIFY=CENTER,COLOR='BLACK',FONT='ARIAL',SIZE=9,STYLE=BOLD,$
TYPE=HEADING,LINE=5,ITEM=5,COLSPAN=7,JUSTIFY=CENTER,COLOR=RGB(153 0 0),FONT='ARIAL',SIZE=9,STYLE=BOLD,BACKCOLOR=RGB(210 210 210),$
TYPE=HEADING,LINE=6,ITEM=1,COLSPAN=3,COLOR='BLACK',$
TYPE=HEADING,LINE=6,ITEM=2,COLSPAN=4,JUSTIFY=CENTER,COLOR='BLACK',FONT='ARIAL',SIZE=9,STYLE=BOLD,BACKCOLOR=RGB(210 210 210),$
TYPE=HEADING,LINE=6,ITEM=3,COLSPAN=4,JUSTIFY=CENTER,COLOR='BLACK',FONT='ARIAL',SIZE=9,STYLE=BOLD,BACKCOLOR=RGB(210 210 210),$
TYPE=HEADING,LINE=6,ITEM=4,COLSPAN=7,JUSTIFY=CENTER,COLOR='BLACK',FONT='ARIAL',SIZE=9,STYLE=BOLD,BACKCOLOR=RGB(210 210 210),$
TYPE=TITLE,FONT='ARIAL',SIZE=9,STYLE=-UNDERLINE,COLOR='BLACK',JUSTIFY=CENTER,BACKCOLOR=RGB(169 169 169),$
TYPE=DATA,FONT='ARIAL',SIZE=9,STYLE=NORMAL,JUSTIFY=LEFT,BORDER=ON,$
ENDSTYLE
END
-RUN

-HTMLFORM BEGIN
<style>
table, th, td {
    border: 1px solid black;
	border-collapse: collapse;
	}
</style>
!IBI.FIL.HOLD_FILE;
-HTMLFORM END
-EXIT 


I still want to have ON TABLE SET HTMLCSS OFF and do the following :
1)Add small padding spaces to the left and right of the values in the date titles (eg Big GrinEALER_COST,RETAIL_COST,SALES etc)
2)Add small padding spaces to the left and right of the data values in the Country,Car,Model,Bodytype etc

Can anyone please let me know how to achieve this ?

Thanks a lot in advance for all your help.

Thanks,
IP

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


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Report This Post
Master
posted Hide Post
Hi,

some things..

First. Why do you HOLD a HTML output and then use HTMLFORM to show it?

When I need something like this I use HTMTABLE not HTML.
The output you're creating isn't correct HTML and some browsers/device might choke on it.



If you
• use HTMLCSS ON
• add RIGHTGAP=0.113889,LEFTGAP=0.113889 to then stylesheet TYPE=REPORT
• SET BORDER=1 for TYPE=REPORT
• SET BORDER=1 ( and not BORDER=ON ?? ) for TYPE=DATA

You get the exact output as the samplecode but -with- extra cell-spacing.



Good luck,
Dave


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Guru
posted Hide Post
Hi Dave,

Actually I don't want to use ON TABLE SET HTMLCSS ON because that causes my headings to not have borders and that is the reason iam using HTMLCSS off...

Please suggest if there is any way to increase the space in the titles and in the data values by retaining the HTMLCSS OFF...

Regards,
IP


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Report This Post
Expert
posted Hide Post
I would urge you to learn how to use the developers tools for your browser choice and play with the CSS to see how each change effects a result in your output.

If you do not know CSS then W3Schools do a reasonable tutorial.

Basically learn the tools that will help you in your quest.

Saying that, try adding td {padding: 0px 15px;} to your style section.

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 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
Since you're using CSS, why not add a td selector?

DEFINE FILE CAR
FIRST_HEAD1/A20='subhead1';
SECOND_HEAD2/A10='subhead2';
A/A3='';
THIRD_HEAD3/A60='Target';
HEAD1/A15='>10%';
HEAD2/A15='>20%';
HEAD3/A15='>30%';
END

TABLE FILE CAR
PRINT *
WHERE RECORDLIMIT EQ 30
HEADING
"Car heading"
"Source data"
"Data Current as of today"
" "
"<A<FIRST_HEAD1<SECOND_HEAD2<A<THIRD_HEAD3"
"<A<HEAD1<HEAD2<HEAD3"
ON TABLE HOLD AS HOLD_FILE FORMAT HTMTABLE
ON TABLE SET PAGE NOLEAD
ON TABLE SET HTMLCSS OFF
ON TABLE SET STYLE *
TYPE=REPORT,SQUEEZE=ON,FONT='ARIAL',SIZE=9,GRID=OFF,BORDER=1.5,TITLETEXT='Car report',$
TYPE=HEADING,HEADALIGN=BODY,$
TYPE=HEADING,LINE=1,JUSTIFY=CENTER,COLSPAN=18,COLOR='BLACK',FONT='ARIAL',SIZE=10,STYLE=BOLD,$
TYPE=HEADING,LINE=2,JUSTIFY=CENTER,COLSPAN=18,COLOR='BLACK',FONT='ARIAL',SIZE=9,STYLE=BOLD+ITALIC,$
TYPE=HEADING,LINE=3,JUSTIFY=CENTER,COLSPAN=18,COLOR='BLACK',FONT='ARIAL',SIZE=9,STYLE=BOLD+ITALIC,$
TYPE=HEADING,LINE=4,COLSPAN=18,COLOR='BLACK',$
TYPE=HEADING,LINE=5,ITEM=1,COLSPAN=3,COLOR='BLACK',$
TYPE=HEADING,LINE=5,ITEM=2,COLSPAN=1,JUSTIFY=CENTER,COLOR='BLACK',FONT='ARIAL',SIZE=9,STYLE=BOLD,BACKCOLOR=RGB(210 210 210),$
TYPE=HEADING,LINE=5,ITEM=3,COLSPAN=1,JUSTIFY=CENTER,COLOR='BLACK',FONT='ARIAL',SIZE=9,STYLE=BOLD,BACKCOLOR=RGB(210 210 210),$
TYPE=HEADING,LINE=5,ITEM=4,COLSPAN=6,JUSTIFY=CENTER,COLOR='BLACK',FONT='ARIAL',SIZE=9,STYLE=BOLD,$
TYPE=HEADING,LINE=5,ITEM=5,COLSPAN=7,JUSTIFY=CENTER,COLOR=RGB(153 0 0),FONT='ARIAL',SIZE=9,STYLE=BOLD,BACKCOLOR=RGB(210 210 210),$
TYPE=HEADING,LINE=6,ITEM=1,COLSPAN=3,COLOR='BLACK',$
TYPE=HEADING,LINE=6,ITEM=2,COLSPAN=4,JUSTIFY=CENTER,COLOR='BLACK',FONT='ARIAL',SIZE=9,STYLE=BOLD,BACKCOLOR=RGB(210 210 210),$
TYPE=HEADING,LINE=6,ITEM=3,COLSPAN=4,JUSTIFY=CENTER,COLOR='BLACK',FONT='ARIAL',SIZE=9,STYLE=BOLD,BACKCOLOR=RGB(210 210 210),$
TYPE=HEADING,LINE=6,ITEM=4,COLSPAN=7,JUSTIFY=CENTER,COLOR='BLACK',FONT='ARIAL',SIZE=9,STYLE=BOLD,BACKCOLOR=RGB(210 210 210),$
TYPE=TITLE,FONT='ARIAL',SIZE=9,STYLE=-UNDERLINE,COLOR='BLACK',JUSTIFY=CENTER,BACKCOLOR=RGB(169 169 169),$
TYPE=DATA,FONT='ARIAL',SIZE=9,STYLE=NORMAL,JUSTIFY=LEFT,BORDER=ON,$
ENDSTYLE
END
-RUN

-HTMLFORM BEGIN
<style>
table, th, td {
    border: 1px solid black;
    border-collapse: collapse;
}

td {
    padding-left: 4px;
    padding-right: 4px;
}
</style>
!IBI.FIL.HOLD_FILE;
-HTMLFORM END
-EXIT 


With HTMTABLE.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
Such a great concept Tony:
quote:
Basically learn the tools that will help you in your quest.




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Virtuoso
posted Hide Post
You can use ON TABLE SET CSSURL '/approot/…/…/….css' to include an external report style sheet, in which you can define CSS classes:
.MYCLASS { margin: 0 5em; }


You can use these in your TABLE request STYLE block:
TYPE=HEADING, LINE=5, ITEM=2, CLASS=MYCLASS,$


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Guru
posted Hide Post
Hi,

Thanks a lot Francis Smiler It worked.

Thanks again everyone for your help Smiler

Regards,
IP


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]How to add left and right spaces in a html report keeping HTMLCSS OFF?

Copyright © 1996-2020 Information Builders