Focal Point
How do I add extra spaces to SORTACR_FIELD_AS?

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/1461084022/m/6347037616

February 16, 2012, 11:20 AM
Theresa
How do I add extra spaces to SORTACR_FIELD_AS?
I was using the SORTACR_FIELD_AS to change the text to 'TIME_LEVEL01_VALUE AS Fiscal Year', but now I have a requirement to line up '(As of 12-31-2011)' with the current fiscal year. I have it set for a rolling 3 period. Right now I am hardcoding dashes, as the extra spaces get truncated. I have two questions:

1) Is there any way to change the dashes to spaces and have them not be truncated?

2) How can I calculate the correct place (the number of spaces) to line up the text with the current fiscal year?

Theresa


PMF: 5.2.3 HF 4
Server: WF 7.6.11/DB2
Desktop: WF 7.6.11/SQL Server/XP
output: HTML
February 16, 2012, 11:52 AM
Bob Jude Ferrante
Nothing I'm about to say has anything to do with PMF really. It's a general WebFOCUS dev question.

Extra spaces in HTML are truncated by browsers. The only way around this is to use the value

'&|nbsp;'


This is not an amper var. It is an "entity reference" to a non-breaking space. The problem is it takes up 5 characters and if it's used in FOCUS, the FOCUS parser will think it's an amper var, and so will throw an error. So any technique to preserve more than one space between text elements in labels to be processed by FOCUS and preserved in final HTML is pretty horrible to contemplate. But you can do things like setting a text var:

-SET &NBSP = '&|nbsp;'


And you'll end up with the proper value which you can then use:

-SET &MYTHING = 'This'|&NBSP|&NBSP|&NBSP|'has'|&NBSP|&NBSP|&NBSP|'three'|&NBSP|&NBSP|&NBSP|'spaces'|&NBSP|&NBSP|&NBSP|'between' ;


My question is what are you using the spaces for? If it is to spread the title across a column to make something line up, that won't work anyway because fonts are rendered proportionally in browsers, a space doesn't take up the same amount of width as period and a a lower-case w doesn't take up the same amount of width as a lower-case i. So tell us WHY you're trying to do this. We'll practice the 5 whys here.

I'm trying to have multiple spaces show up in a browser for an AS name
Why?
Because[more purposeful reason]
==repeat until root requirement is revealed.==


Bob Jude Ferrante
Director of Business and Development
WebFOCUS Performance Management
Bob_Ferrante@ibi.com
917-339-5105

I'll take any questions about PMF - business or technical - anytime!

February 16, 2012, 01:22 PM
Theresa
The why is easy. We are displaying rolling 3 periods (fiscal years) and we only have data for the current fiscal year through the end of calendar 2011. But displaying 'Fiscal Year (As of 12-31-2011)' was not good enough. The higher ups thought it would be confusing to have the As of date displayed directly over FY 2010. They wanted us to move it over so that it is directly above the current FY (2012). If you have a good alternative that would accomplish the same thing, I'd love to hear it! Smiler

Thanks!
Theresa


PMF: 5.2.3 HF 4
Server: WF 7.6.11/DB2
Desktop: WF 7.6.11/SQL Server/XP
output: HTML