Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
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
Go
New
Search
Notify
Tools
Reply
  
[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, 2010Reply With QuoteReport 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, 2010Reply With QuoteReport 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, 2005Reply With QuoteReport 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, 2010Reply With QuoteReport 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.06OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6212 | Location: 33.8688° S, 151.2093° E | Registered: October 31, 2006Reply With QuoteReport 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.06 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5637 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport 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, 2005Reply With QuoteReport 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.


WF 8.2.06
Win10 / IE11
AHTML EXL2K PDF
 
Posts: 147 | Registered: October 19, 2010Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Tags don't nest. Meant to post:

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


WF 8.2.06
Win10 / IE11
AHTML EXL2K PDF
 
Posts: 147 | Registered: October 19, 2010Reply With QuoteReport 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 7 - IE11.
in Focus since 1988
 
Posts: 1960 | Location: Netherlands | Registered: September 25, 2007Reply With QuoteReport 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, 2010Reply With QuoteReport 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 7 - IE11.
in Focus since 1988
 
Posts: 1960 | Location: Netherlands | Registered: September 25, 2007Reply With QuoteReport 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, 2010Reply With QuoteReport 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, 2005Reply With QuoteReport 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, 2008Reply With QuoteReport This Post
  Powered by Social Strata  
 

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-2018 Information Builders, leaders in enterprise business intelligence.