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     Retaining multiple spaces
Go
New
Search
Notify
Tools
Reply
  
Retaining multiple spaces
 Login/Join
 
<Jeff Plitt>
posted
When running a WF5.2.5 report in HTML or Excel formats a field that carries multiple contiguous spaces has only one space on the report output. For example '123XX 456' (two spaces) will appear as '123XX 456' (one space). In PDF format this is not true. The SQUEEZE setting is OFF. I have assumed that this is due to HTML limitation. Is there a simple way around the problem? Thanks.
 
Reply With QuoteReport This Post
<Pietro De Santis>
posted
There's no simple way to ensure multiple blank spaces for HTML output. Web browser functionality forces multiple blanks to be displayed as 1 blank.

I've not tried this, but perhaps you could use the CTRAN or OVRLAY functions in a DEFINE to translate blanks to some other undisplayable character, which the browser most likely will not squeeze to 1 blank.

Pietro.
 
Reply With QuoteReport This Post
Guru
posted Hide Post
Jeff-
Here's one solution right off the tech support site:
Problem:

How to add spaces between columns in an HTML report?


Solution:

Example:

DEFINE FILE CAR
AMPER/A1 WITH COUNTRY = HEXBYT(38, AMPER);
SEMI/A1 WITH COUNTRY = HEXBYT(59, SEMI);
NBSP/A6 WITH COUNTRY = AMPER | 'nbsp' | SEMI;
GAP/A36 WITH COUNTRY = NBSP | NBSP | NBSP | NBSP | NBSP;
END
TABLE FILE CAR
PRINT GAP AS ' ' GAP AS ' ' CAR MODEL SEATS
BY COUNTRY
ON TABLE SET STYLE *
TYPE=REPORT,GRID=OFF, $
ENDSTYLE
END

HTH
 
Posts: 252 | Location: USA | Registered: April 15, 2003Reply With QuoteReport This Post
<Jeff Plitt>
posted
Thanks for your suggestions.

The problem occurs within a field and spaces inside are valid in multiple positions so the 'between columns' example doesn't seem to apply directly. I have chosen to replace the spaces with an underscore via CTRANS for the time being and will experiment with other replacement values.
 
Reply With QuoteReport This Post
Gold member
posted Hide Post
& nbsp (I had to include a space between the &n or it would just show as a space) is the character for a space in html. You can try that instead of your underscore. It may or may not have the result you were looking for. So... & n b s p are the letters that need to be together with no spaces.
 
Posts: 77 | Location: Chicago, IL | Registered: May 06, 2004Reply With QuoteReport This Post
Expert
posted Hide Post
Jeff,

One thing to note is that the & nbsp requires a semi colon terminator in HTML, but I think a possible solution to your display is to use the PRE tag in HTML.

Try the following example -

DEFINE FILE CAR
MY_TEXT/A80 = COUNTRY |
'     '
| CAR ;
MY_TEXT_PRE/A90 = '<PRE>' | MY_TEXT | '</PRE>' ;
END
TABLE FILE CAR
PRINT MY_TEXT MY_TEXT_PRE
END

The biggest downside is that the font used is not always acceptable for some company reports but it does overcome your problem!

Comparison of one line of the output would be -

ENGLAND JAGUAR
ENGLAND        JAGUAR


Good luck!

Tony

Edited to preserve the 5 spaces in the define
 
Posts: 5617 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
<Jeff Plitt>
posted
Thanks for your responses.

Using Tony's suggestion has solved the problem for display in HTML and Excel. I appreciate your help.

Jeff
 
Reply With QuoteReport This Post
Guru
posted Hide Post
I'm trying to add extra spaces in a heading in HTML and EXL2K format. I was able to get jimster06's code to work in HTML. In EXL2K I tried concatenating spaces and that did not work I also tried <PRE> but in a heading < creates an error because its now looking for the field PRE.

Any help would be great.
 
Posts: 406 | Location: Canada | Registered: May 31, 2004Reply With QuoteReport This Post
Expert
posted Hide Post
This works for me, in html only, tho:
-SET &BLANK='&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;';
then use the &var called &BLANK in my headers or wherever i need it.
If i needed a virtual variable, then i'ld just stick it in the defines, same way.
That escape character, |, is what does the trick.

In Excel, Tony's way is cool;
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
<Pietro De Santis>
posted
You may be able to code
<|PRE
in the HEADING
 
Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Retaining multiple spaces

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.