Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Special Character in Count
Go
New
Search
Notify
Tools
Reply
  
[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, 2010Reply With QuoteReport 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, 2010Reply With QuoteReport 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, 2010Reply With QuoteReport 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, 2010Reply With QuoteReport 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, 2007Reply With QuoteReport 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, 2007Reply With QuoteReport 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, 2010Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Special Character in Count

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.