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.

New TIBCO Community Coming Soon
In early summer, TIBCO plans to launch a new community—with a new user experience, enhanced search, and expanded capabilities for member engagement with answers and discussions! In advance of that, the current myibi community will be retired on April 30. We will continue to provide updates here on both the retirement of myibi and the new community launch.

What You Need to Know about Our New Community
We value the wealth of knowledge and engagement shared by community members and hope the new community will continue cultivating networking, knowledge sharing, and discussion.

During the transition period, from April 20th until the new community is launched this summer, myibi users should access the TIBCO WebFOCUS page to engage.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Indentation of a Field in a cell - for Excel output

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Indentation of a Field in a cell - for Excel output
 Login/Join
 
Platinum Member
posted
Good Morning,

I have a field that is to be displayed indented from the left. I modify that field for three different versions of output. (HTML,Excel & PDF).
I do this by the following code:

DESC_NEW_H/A100 = IF SGN EQ 1 AND SNO IN( 8,9,10,11) THEN '&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;' | DESC ELSE DESC;
DESC_NEW_P/A100 = IF SGN EQ 1 AND SNO IN( 8,9,10,11) THEN ' ' | DESC ELSE DESC;
DESC_NEW_Q/A100 = IF SGN EQ 1 AND SNO IN( 8,9,10,11) THEN ' ' | DESC ELSE DESC;
DESC_DISP_FIELD/A100 = IF '&FORMAT.EVAL' EQ 'HTML' THEN DESC_NEW_H ELSE
IF '&FORMAT.EVAL' EQ 'PDF' THEN DESC_NEW_P ELSE
IF '&FORMAT.EVAL' EQ 'EXL2K' THEN DESC_NEW_Q;


The spaces for the HTML and PDF versioned field is respected.
The problem is that the spaces for the Excel field are not respected and the field comes out left justified.

How do I accomplish padding spaces in front of my field for Excel output.

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




Prod: WebFOCUS 7.6.10 MRE
Oracle/Sybase
Test: DevStudio 7.6.6
WF Server 7.6.6
Report Caster 7.6.6
Web Server - Tomcat
MS Windows XP SP2
Output: HTML, Excel 2000 , PDF, CSV, DOC

 
Posts: 133 | Registered: December 29, 2006Report This Post
Virtuoso
posted Hide Post
You could try creating the value using HEXBYT(). For the EURO sign I use this:
-SET &LABEL = 'Price (' | HEXBYT(128, 'A1') | ')';


I don't know what encoding Excel uses by default, it appears to be something unusual, but you could try code 160 ('nbsp' and '#160' are the same entity in HTML).

Also keep in mind that, although the name of the HEXBYT function suggests that it expects hexa-decimal input, it actually expects decimal input.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Virtuoso
posted Hide Post
Try using HEXBYT(13,'A1') for indentation in EXL2K output. Plain EXCEL output respects spaces.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Expert
posted Hide Post
quote:
You can use the SET SHOWBLANKS command in the SET tooI if you want to preserve leading and internal blanks in HTML and EXL2K report output. By default, HTML browsers and Excel remove leading and trailing blanks from text and compress multiple internal blanks to a single blank.


How about leaving the spaces and using the SHOWBLANKS setting? Try that and see if it works for you.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Platinum Member
posted Hide Post
Thanks everyone for your responses to this issue. This problem was soulved by implementing the command below. Which allows youe code to respect/display spaces...
Thanks Again


SET SHOWBLANKS = ON  

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




Prod: WebFOCUS 7.6.10 MRE
Oracle/Sybase
Test: DevStudio 7.6.6
WF Server 7.6.6
Report Caster 7.6.6
Web Server - Tomcat
MS Windows XP SP2
Output: HTML, Excel 2000 , PDF, CSV, DOC

 
Posts: 133 | Registered: December 29, 2006Report 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] Indentation of a Field in a cell - for Excel output

Copyright © 1996-2020 Information Builders