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] WEBFOCUS Large DEFINE field in SUBFOOT inserting CR/LF into rendered HTML

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] WEBFOCUS Large DEFINE field in SUBFOOT inserting CR/LF into rendered HTML
 Login/Join
 
Member
posted
Hi everyone,

I've been researching this issue trying to get to the exact 'why' of it. I have a project where under each retreived row, I display notes as a SUBFOOT that vary in length from 1-1500 characters.

Here's the problem, occurs when using FORMAT HTMTABLE. When I take the notes from a DEFINE or COMPUTE and display them in the SUBFOOT, webfocus inserts a CR/LF into the text at various points as it generates the HTML to send to the browser.

As a result of this, when looking in the view source, instead of seeing...
1234567890 1234567890 1234567890

you might see...
1234567890 123
4567890 1234567890

Internet explorer interprets the CRLF as a space and displays accordingly with the magic space in your otherwise nicely formatted notes...

Has anyone encountered this before, and if so, do you know of a workaround? Thank you in advance.
  

I have constructed a very simplified CAR table demonstration of the issue. It saves the table in HTMTABLE FORMAT and then displays it in a HTMLFORM block.
(Note the space between the 7 and 8 on the 3rd line of the SUBFOOT)

  

DEFINE FILE CAR
TXT/A1700='123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789';
END
TABLE FILE CAR
PRINT 
CAR
BY MODEL 
ON MODEL SUBFOOT
"<TXT"
ON TABLE SET STYLE *
TYPE=REPORT,SIZE=8, $
ENDSTYLE
ON TABLE HOLD FORMAT HTMTABLE AS RPT
END
-RUN


-HTMLFORM BEGIN


<html>
<body>


<table cellpadding=0 cellspacing=0 border=0 id=rpt style="width:100%;">
	<tr>
		<td style="padding: 0px 5px 0px 5px; width:100%;">
		  <div id=reportdiv>	  
		  !IBI.FIL.RPT;
		  </div>
		</td>
	</tr>
</table>


</body>
</html>
-HTMLFORM END

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


Production: 7.6.4
Test: 7.6.10
Windows XP, all output
IE6
 
Posts: 5 | Registered: July 20, 2010Report This Post
Member
posted Hide Post
I apologize, the HTML did not come through in the copy/paste of the code...

  

DEFINE FILE CAR
TXT/A1700='123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 <br>';
END
TABLE FILE CAR
PRINT 
CAR
BY MODEL 
ON MODEL SUBFOOT
"<TXT"
ON TABLE SET STYLE *
TYPE=REPORT,SIZE=8, $
ENDSTYLE
ON TABLE HOLD FORMAT HTMTABLE AS RPT
END
-RUN


-HTMLFORM BEGIN


<html>
<body>


<table cellpadding=0 cellspacing=0 border=0 id=rpt style="width:100%;">
	<tr>
		<td style="padding: 0px 5px 0px 5px; width:100%;">
		  <div id=reportdiv>	  
		  !IBI.FIL.RPT;
		  </div>
		</td>
	</tr>
</table>


</body>
</html>
-HTMLFORM END

-EXIT



Production: 7.6.4
Test: 7.6.10
Windows XP, all output
IE6
 
Posts: 5 | Registered: July 20, 2010Report This Post
Gold member
posted Hide Post
Try this:

  
.
.
.
ON TABLE PCHOLD FORMAT HTMTABLE AS RPT
END
HOLD AS RPT FORMAT HTMTABLE
-RUN


WebFOCUS 8105
Windows;
DB2, UDB, SQL Server, Oracle
FOCUS-WebFOCUS since 1981
 
Posts: 84 | Registered: December 13, 2005Report This Post
Member
posted Hide Post
Hi Microfich,

That actually worked like a charm on the simplified demonstration I provided. The problem is my actual application has a lot of css styling which is lost when I implement your solution (which DOES fix the spacing issue)...

I have added the 2 simple styles to the original demo to illustrate...

  
DEFINE FILE CAR
TXT/A1700='123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 <br>';
END
TABLE FILE CAR
PRINT 
CAR
BY MODEL 
ON MODEL SUBFOOT
"<TXT"
ON TABLE SET STYLE *
TYPE=REPORT,SIZE=8, $
TYPE=SUBFOOT,CLASS=SUBFOOTCONTENT,COLSPAN=9,$
TYPE=DATA,CLASS=sicdata,$
ENDSTYLE
ON TABLE HOLD FORMAT HTMTABLE AS RPT
END

-RUN





-HTMLFORM BEGIN


<html>
<head>

<style>
.sicdata {
	background-color: #DFDED9;
	border: none;
	padding: 3px 0px 3px 4px;
	font-family: verdana;
	font-size: 12px;
	font-weight: normal;
	border-right: 1px solid #FFFFFF;
}

.SUBFOOTCONTENT {
	font-family: verdana;
	font-size: 12px;
	font-weight: normal;
	background-color: #FFFFFF;
	padding-bottom: 4px;
	white-space:normal;
}
</style>

</head>
<body>


<table cellpadding=0 cellspacing=0 border=0 id=rpt style="width:100%;">
	<tr>
		<td style="padding: 0px 5px 0px 5px; width:100%;">
		  <div id=reportdiv>	  
		  !IBI.FIL.RPT;
		  </div>
		</td>
	</tr>
</table>


</body>
</html>
-HTMLFORM END

-EXIT



Production: 7.6.4
Test: 7.6.10
Windows XP, all output
IE6
 
Posts: 5 | Registered: July 20, 2010Report This Post
Expert
posted Hide Post
I think the issue is with the !IBI.FIL.RPT; command.

The long text only gets corrupted when included with this command.

If you can get all the code into the TABLE request and point to the CSS file for styling, then you may be able to get it working.


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Expert
posted Hide Post
For info your original example worked on my set-up, without any changes.

What browser are you using?

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
I recall this problem was reported fairly recently, but I cannot find the post.

It appears WebFOCUS breaks the footing into strings 498 characters long.

Correction: 511 character strings.

This message has been edited. Last edited by: Francis Mariani,


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
Platinum Member
posted Hide Post
I tried
 
TYPE=REPORT,SIZE=8,  [COLOR:RED]WRAP=OFF,[/COLOR] $  


Worked for me. I would be interested to hear if it has a positive effect in your situation.


WebFOCUS 8.2.06
 
Posts: 210 | Location: Sterling Heights, Michigan | Registered: October 19, 2010Report This Post
Platinum Member
posted Hide Post
Tags don't nest. Meant to post:

TYPE=REPORT,SIZE=8, WRAP=OFF, $


WebFOCUS 8.2.06
 
Posts: 210 | Location: Sterling Heights, Michigan | Registered: October 19, 2010Report This Post
Virtuoso
posted Hide Post
Casey is using 7.6.3. In versions prior to 7.7 there is indeed a limit of 511 character per html record. Anything larger than that will be split into two (or more) lines.
This limit is not present anymore in 7.7.01, there these long lines are left intact.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Member
posted Hide Post
Good morning everyone, and thank you for the prompt and insightful replies.

In answer to a few questions. My users are all using IE6 currently (upgrading to IE8 in Feb).

We are using Webfocus 7.6.6 currently and are also in the process of upgrading this to 7.6.10

This makes GamP's comment that much nicer to hear. The problem should be resolved when the upgrade is complete with no further changes. I will confirm this in our sandbox environment.

Thank you again everyone. Smiler


Production: 7.6.4
Test: 7.6.10
Windows XP, all output
IE6
 
Posts: 5 | Registered: July 20, 2010Report This Post
Virtuoso
posted Hide Post
Mind you, 7.6.10 still has the limit. It's only with 7.7 that the limit is raised (or removed).


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Member
posted Hide Post
Oops, for some reason I read 7.7 as 7.6.7

Looks like I need to find a workaround afterall. WRAP=OFF doesn't fix the issue in 7.6.4 unfortunately.

Thank you for clearing that up for me GamP.


Production: 7.6.4
Test: 7.6.10
Windows XP, all output
IE6
 
Posts: 5 | Registered: July 20, 2010Report This Post
Virtuoso
posted Hide Post
quote:
Originally posted by GamP:
This limit is not present anymore in 7.7.01, there these long lines are left intact.


Unfortunately, that seems not to be the case in 7.7.03M.

I am experiencing the same issue where creating an HTMTABLE HOLD file out of columns longer than 511 characters is breaking their content into chunks of 511 characters (squeezing a line break in between) which are finally rendered as a SPACE (char 32) in HTML (using Internet Explorer 8).

This would it be so bad if it wasn't for the fact that we use HTML as part of our actual data to provide "formatted comments" in our reports and that "magic" space may actually be happening in the middle of an HTML tag rendering useless.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Guru
posted Hide Post
I know this is dumb but try holding as EXL2K instead of HTMTABLE. It seems to have fixed the issue in our reports. You will have to use WebFocus styling. I could not get CSS Classes to work but you can still manipulate the body, table, td, using styles. Also you can define fields that have html tags in them to manipulat e the styling of the data.

  
DEFINE FILE CAR
TXT/A1700='123456789 123456789 123456789 123456789 123456789 123456789 ' |
          '123456789 123456789 123456789 123456789 123456789 123456789 ' |
		  '123456789 123456789 123456789 123456789 123456789 123456789 ' |
		  '123456789 123456789 123456789 123456789 123456789 123456789 ' | 
		  '123456789 123456789 123456789 123456789 123456789 123456789 ' |
		  '123456789 123456789 123456789 123456789 123456789 123456789 ' | 
		  '123456789 123456789 123456789 123456789 123456789 123456789 ' | 
		  '123456789 123456789 123456789 123456789 123456789 123456789 ' | 
		  '123456789 123456789 123456789 123456789 123456789 123456789 ' | 
		  '123456789 123456789 123456789 123456789 123456789 123456789 ' | 
		  '123456789 123456789 123456789 123456789 123456789 123456789 ' | 
		  '123456789 123456789 123456789 123456789 123456789 123456789 ' | 
		  '123456789 123456789 123456789 123456789 123456789 123456789 ' | 
		  '123456789 123456789 123456789 123456789 123456789 123456789 ' | 
		  '123456789 123456789 123456789 123456789 123456789 123456789 ' | 
		  '123456789 123456789 123456789 123456789 123456789 123456789 ' | 
		  '123456789 123456789 123456789 123456789 123456789 123456789 ' | 
		  '123456789 123456789 123456789 123456789 123456789 123456789 ' | 
		  '123456789 123456789 123456789 123456789 123456789 123456789 ' | 
		  '123456789 123456789 123456789 123456789 123456789 123456789 ' | 
		  '123456789 123456789 123456789 123456789 123456789 123456789 ' | 
		  '123456789 123456789 123456789 123456789 123456789 123456789 ' | 
		  '123456789 123456789 123456789 123456789 123456789 123456789 ' | 
		  '123456789 123456789 123456789 123456789 123456789 123456789 ' | 
		  '123456789 123456789 123456789 123456789 123456789 123456789 ' | 
		  '123456789 123456789 123456789 123456789 123456789 123456789 ' | 
		  '123456789 123456789 123456789 123456789';
END
TABLE FILE CAR
PRINT 
CAR
BY MODEL 
ON MODEL SUBFOOT
"<TXT"
ON TABLE SET STYLE *
TYPE=REPORT,SIZE=8, $
ENDSTYLE
ON TABLE HOLD AS RPT FORMAT EXL2K
END
-RUN

-HTMLFORM BEGIN
<html>
 <head>
  <style type="text/css">
  body { font-size: 10pt; font-family: "Times New Roman"; }
  table { border-collapse: collapse; width: 100%; }
  td { vertical-align: top !important; white-space:normal !important; }
  </style>
 </head>
<body>
 !IBI.FIL.RPT;
</body>
</html>
-HTMLFORM END


WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
 
Posts: 320 | Location: Memphis, TN | Registered: February 12, 2008Report 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] WEBFOCUS Large DEFINE field in SUBFOOT inserting CR/LF into rendered HTML

Copyright © 1996-2020 Information Builders