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] Leading Spaces Padding in HTML Text Box

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Leading Spaces Padding in HTML Text Box
 Login/Join
 
Member
posted
Hello, I am having an issue I am trying to solve with a text box in HTML composer. Leading spaces are being added to the number in a string when displayed in a text box on an HTML composer page, but not in the raw XML output, even though || is used for concatenating a $ sign. The number of leading spaces is the length of the number minus the the length specified in the second argument of FTOA. So if the length of that argument matches the length of the number there are no spaces between the number and the $ sign.

DEFINE FILE CAR
FTOA(PLAN_INFO.SEG01.PLAN_ASSETS, 'A20V', 'A20V'), 20, ' ', 1, 'A20V');
COST1/A150V= '$'||FTOA(CAR.BODY.DEALER_COST, '(D12)', 'A50V');
END
TABLE FILE CAR
SUM COST1
ON TABLE PCHOLD FORMAT XML
END  


XML Output:
  
<?xml version="1.0" encoding="UTF-8" ?> 
- <fxf version="1.0" data="hold">
- <report records="18" lines="1" columns="1" rows="1">
  <target format="" version="" type="" destination="HOLD" /> 
- <column_desc>
  <col colnum="c0" fieldname="COST1" alias="E01" datatype="char" width="150" focus_format="A150V" description="" accept="" help_message="" title="" property="" reference="" valign="left" /> 
  </column_desc>
- <table>
- <tr linetype="data" linenum="1">
  <td colnum="c0">$ 4,631</td> 
  </tr>
  </table>
  </report>
  </fxf>


Text box output (when used as a dynamic procedure in HTML composer for a text box):

$          4,631  


Any suggestions? Any of the usual ways to get rid of the spaces with concatenation or functions do not seem to work with the text box output.

thanks

This message has been edited. Last edited by: <Kathryn Henning>,


WF: WebFocus 8.0.02
InfoAssist, Dev Studio, Magnify, Portal/Dashboards, Mobile Favs
Data: DB2
OS: Windows
Output: Multiple
 
Posts: 23 | Location: KC, MO | Registered: August 05, 2013Report This Post
Expert
posted Hide Post
Try this -

COST1/A25= '$'||LJUST(24, FPRINT(DEALER_COST, 'D12', 'A24'), 'A24');


Although if you want to prefix the monetary symbol then just use the correct incoming format -

COST1/A25= LJUST(25, FPRINT(DEALER_COST, 'D12M', 'A25'), 'A25');


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
Virtuoso
posted Hide Post
Just a note on concatenation. The strong concatenation || affects the left argument in the expression, removing trailing spaces for that argument, so does not affect leading spaces on the right hand argument which remain in place.

Also the XML produced shows a single space, but a view source will show that multiple spaces in raw HTML are reduced to 1 space when displayed. Try a view source on the XML output and you will see the full multiple spaces that end up in the text box.

Tony's second example is probably the easiest solution.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Guru
posted Hide Post
If all else fails, check the Control itself and you &DEFAULT in your fex. If you are setting it to " " it will pick it up in the control.

I get caught on that all the time.

There are spaces between the double quotes.

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


WebFOCUS 8.1.05
 
Posts: 496 | Registered: January 04, 2008Report This Post
Expert
posted Hide Post
In my opinion, FPRINT is a great function, except for the right-justification. I don't see why it doesn't left justify, there's no logical reason to preserve the leading blanks.


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
Member
posted Hide Post
Thanks for the quick responses. The suggested formatting worked. I am still fairly new to wf and don't have all the formatting tricks and functions memorized yet, this was very helpful.


WF: WebFocus 8.0.02
InfoAssist, Dev Studio, Magnify, Portal/Dashboards, Mobile Favs
Data: DB2
OS: Windows
Output: Multiple
 
Posts: 23 | Location: KC, MO | Registered: August 05, 2013Report 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] Leading Spaces Padding in HTML Text Box

Copyright © 1996-2020 Information Builders