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     [CLOSED] Row Formats in Stylesheet

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Row Formats in Stylesheet
 Login/Join
 
Member
posted
I have one column named January it is in D20.2 format. I need specific rows in different formats:
Miles should be /D20C
Price / Gallon = /D20.2M
Gas Cost = /D20M
Percent of Something = /D20.2%

How can this be done?

January
Miles 50,000
Price / Gallon $3.45
Gas Cost $172,500
Percent of 51.25%
Something



FOUND THE ANSWER....
DEFINE FILE NUMBERS
NR9/P20.9 = NUMBER ;
NR8/P20.8 = NR9 ;
NR7/P20.7 = NR8 ;
NR6/P20.6 = NR7 ;
NR5/P20.5 = NR6 ;
NR4/P20.4 = NR5 ;
NR3/P20.3 = NR4 ;
NR2/P20.2 = NR3 ;
NR1/P20.1 = NR2 ;
NR0/P20.0 = NR1 ;
FORMATX/A8 = IF (NR8 NE NR9) THEN 'D20.9' ELSE
IF (NR7 NE NR8) THEN 'D20.8' ELSE
IF (NR6 NE NR7) THEN 'D20.7' ELSE
IF (NR5 NE NR6) THEN 'D20.6' ELSE
IF (NR4 NE NR5) THEN 'D20.5' ELSE
IF (NR3 NE NR4) THEN 'D20.4' ELSE
IF (NR2 NE NR3) THEN 'D20.3' ELSE
IF (NR1 NE NR2) THEN 'D20.2' ELSE
IF (NR0 NE NR1) THEN 'D20.1' ELSE 'D20.0';
END
-*
TABLE FILE NUMBERS
PRINT
NUMBER
NUMBER/FORMATX
END

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


7.6.8
UNIX
FOCUS,HTML,PDF,EXCEL.
 
Posts: 18 | Registered: September 29, 2010Report This Post
Master
posted Hide Post
Hi Todd,

Take a look at Dynamic Formatting.

For example:
APP PREPENDPATH IBISAMP
-*
DEFINE FILE GGSALES
 FLDFMT/A8 = DECODE SEQ_NO (1 'D12M'
                            2 'D12.2'
                            3 'I8:L'
                            4 'I8:Y');
END
TABLE FILE GGSALES
PRINT SEQ_NO
      UNITS
      UNITS/FLDFMT
IF SEQ_NO LE 4
END


Yields:

PAGE 1 
 
Sequence# Unit Sales Unit Sales 
1         1387       $1,387 
2         1729        1,729.00 
3         1698        £1,698 
4         1669        ¥1,669 

Dave




Pilot: WebFOCUS 8.2.06 Test: WebFOCUS 8.1.05M Prod: WebFOCUS 8.1.05M Server: Windows Server 2016/Tomcat Standalone Workstation: Windows 10/IE11+Edge Database: Oracle 12c, Netezza, & MS SQL Server 2019 Output: AHTML/XLSX/HTML/PDF/JSCHART Tools: WFDS, Repository Content, BI Portal Designer & ReportCaster
 
Posts: 822 | Registered: April 23, 2003Report This Post
Virtuoso
posted Hide Post
quote:
'I8:L' and 'I8:Y'


Nice! I don't think I was aware of those modifiers to the data type to get different currency symbols. Very useful! Thanks David.



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, 2005Report 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     [CLOSED] Row Formats in Stylesheet

Copyright © 1996-2020 Information Builders