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] Special Character in Count

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Special Character in Count
 Login/Join
 
Silver Member
posted
Hi,

This is the code I am trying to run.

 TABLE FILE CAR
PRINT 
     CAR.COMP.CAR
     CAR.CARREC.MODEL
     CAR.BODY.BODYTYPE
     COMPUTE COUNT1/D5 = CNT.CAR.COMP.CAR; NOPRINT 
BY  LOWEST CAR.ORIGIN.COUNTRY
     
ON CAR.ORIGIN.COUNTRY SUBHEAD
" <CAR.ORIGIN.COUNTRY"
ON CAR.ORIGIN.COUNTRY SUBFOOT
"<ST.COUNT1"
ON TABLE SET PAGE-NUM NOLEAD 
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
END
-EXIT
 


I am getting the required count.But I want '#' sign to be appended in front of the count.
For example if there are 4 cars in england I want to display #4.
Can somebody give me some ideas.
Thanks.

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


WebFOCUS 7.6.7
windows
Html,Pdf and Excel
 
Posts: 39 | Registered: September 03, 2010Report This Post
Master
posted Hide Post
quote:
TABLE FILE CAR PRINT CAR.COMP.CAR CAR.CARREC.MODEL CAR.BODY.BODYTYPE COMPUTE COUNT1/D5 = CNT.CAR.COMP.CAR; NOPRINT BY LOWEST CAR.ORIGIN.COUNTRY ON CAR.ORIGIN.COUNTRY SUBHEAD "


TABLE FILE CAR
PRINT 
     CAR.COMP.CAR
     CAR.CARREC.MODEL
     CAR.BODY.BODYTYPE
     COMPUTE COUNT1/D5 = CNT.CAR.COMP.CAR; NOPRINT 
BY  LOWEST CAR.ORIGIN.COUNTRY
     
ON CAR.ORIGIN.COUNTRY SUBHEAD
" <CAR.ORIGIN.COUNTRY"
ON CAR.ORIGIN.COUNTRY SUBFOOT
"# <ST.COUNT1"
ON TABLE SET PAGE-NUM NOLEAD 
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
END
-EXIT


????
- ABT


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
 
Posts: 561 | Registered: February 03, 2010Report This Post
Silver Member
posted Hide Post
I think I did not ask the question properly.I want the COUNT under CAR column with # infront of it.

TABLE FILE CAR
PRINT 
     CAR.COMP.CAR
     CAR.CARREC.MODEL
     CAR.BODY.BODYTYPE
     COMPUTE COUNT1/D5 = CNT.CAR.COMP.CAR; NOPRINT 
BY  LOWEST CAR.ORIGIN.COUNTRY
     
ON CAR.ORIGIN.COUNTRY SUBHEAD
" <CAR.ORIGIN.COUNTRY"
ON CAR.ORIGIN.COUNTRY SUBFOOT
"Total <+0>#<ST.COUNT1<+0>"
ON TABLE SET PAGE-NUM NOLEAD 
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = endeflt,
$
TYPE=SUBFOOT,
     HEADALIGN=BODY,
$
TYPE=SUBFOOT,
     BY=1,
     LINE=1,
     OBJECT=TEXT,
     ITEM=1,
	 COLSPAN=1,
     BACKCOLOR=RGB(205 205 205),
$
TYPE=SUBFOOT,
     BY=1,
     LINE=1,
     OBJECT=FIELD,
     ITEM=2,
	 COLSPAN=1,
     
$

ENDSTYLE
END
-EXIT

  


It treats '#' differently and I want #Sorry for the confusion.


WebFOCUS 7.6.7
windows
Html,Pdf and Excel
 
Posts: 39 | Registered: September 03, 2010Report This Post
Silver Member
posted Hide Post
my previous message was not posted correctly.

It treats '#' and I want #Sorry for the confusion.


WebFOCUS 7.6.7
windows
Html,Pdf and Excel
 
Posts: 39 | Registered: September 03, 2010Report This Post
Virtuoso
posted Hide Post
If your report does not contain any other amounts with currency symbols (such as '$'), you can use a trick proposed in a post from some time ago. Essentially, you set the currency symbol to '#' and then add currency symbol display to the amount field (i.e., 'D5M' in this case.)

TABLE FILE CAR
 PRINT 
  CAR.COMP.CAR
  CAR.CARREC.MODEL
  CAR.BODY.BODYTYPE
  COMPUTE COUNT1/D5M = CNT.CAR.COMP.CAR; NOPRINT 
 BY  LOWEST CAR.ORIGIN.COUNTRY
 ON CAR.ORIGIN.COUNTRY SUBHEAD
  " <CAR.ORIGIN.COUNTRY"
 ON CAR.ORIGIN.COUNTRY SUBFOOT
  "Total<ST.COUNT1<+0>"
 ON TABLE SET PAGE-NUM NOLEAD 
 ON TABLE NOTOTAL
 ON TABLE SET CURRSYMB '#'
 ON TABLE PCHOLD FORMAT HTML
 ON TABLE SET HTMLCSS ON
 ON TABLE SET STYLE *
  TYPE=SUBFOOT, HEADALIGN=BODY, $
  TYPE=SUBFOOT, BY=1, LINE=1, OBJECT=TEXT, ITEM=1, COLSPAN=1, BACKCOLOR=RGB(205 205 205), $
  TYPE=SUBFOOT, BY=1, LINE=1, OBJECT=FIELD, ITEM=2, COLSPAN=1, $
 ENDSTYLE
END


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Virtuoso
posted Hide Post
If the currency symbol trick described above won't work in your case, then another approach is to use function FTOA to convert the amount to an alphanumeric value with a pre-pended '#' before displaying it in the SUBFOOT.

TABLE FILE CAR
 PRINT
  CAR.COMP.CAR
  CAR.CARREC.MODEL
  CAR.BODY.BODYTYPE
  COMPUTE COUNT1/D5 = CNT.CAR.COMP.CAR; NOPRINT
 BY  LOWEST CAR.ORIGIN.COUNTRY
 ON CAR.ORIGIN.COUNTRY COMPUTE COUNTX/A7 = '#' || FTOA(COUNT1,'(D5)','A6'); NOPRINT
 ON CAR.ORIGIN.COUNTRY SUBHEAD
  " <CAR.ORIGIN.COUNTRY"
 ON CAR.ORIGIN.COUNTRY SUBFOOT
  "Total<COUNTX<+0>"
 ON TABLE SET PAGE-NUM NOLEAD
 ON TABLE NOTOTAL
 ON TABLE PCHOLD FORMAT HTML
 ON TABLE SET HTMLCSS ON
 ON TABLE SET STYLE *
  TYPE=SUBFOOT, HEADALIGN=BODY, $
  TYPE=SUBFOOT, BY=1, LINE=1, OBJECT=TEXT, ITEM=1, COLSPAN=1, BACKCOLOR=RGB(205 205 205), $
  TYPE=SUBFOOT, BY=1, LINE=1, OBJECT=FIELD, ITEM=2, COLSPAN=1, $
 ENDSTYLE
END


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Silver Member
posted Hide Post
Thanks Dan.Count worked perfect for me.I appreciate your help.


WebFOCUS 7.6.7
windows
Html,Pdf and Excel
 
Posts: 39 | Registered: September 03, 2010Report 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] Special Character in Count

Copyright © 1996-2020 Information Builders