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] Total Item Count displayed on each duplicate row
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Total Item Count displayed on each duplicate row
 Login/Join
 
Platinum Member
posted
WF 8105
I need a report that will show the total number of an item for each item type in is own column. Not easy to put into words....lolz

This is also needed in a WHERE because they only want to see this when there are 4 or more claims on one policy.
EXAMPLE

One policy could have 5 different claims on it. They want the report to look like this.

Policy Number | Claim Number | Claim Count
123456 0001 5
123456 0002 5
123456 0003 5
123456 0004 5
123456 0005 5

Thanks
JV
WF 8105

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8105m
Windows, All Outputs
 
Posts: 133 | Registered: August 23, 2010Reply With QuoteReport This Post
Expert
posted Hide Post
Something like
TABLE FILE GGSALES
COUNT
     GGSALES.SALES01.DOLLARS WITHIN REPORT
     GGSALES.SALES01.DOLLARS WITHIN REGION
     GGSALES.SALES01.DOLLARS WITHIN ST
BY  GGSALES.SALES01.REGION
BY  LOWEST GGSALES.SALES01.ST
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = warm,
$
ENDSTYLE
END


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.06 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5608 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Yes, but there are other fields that need to print also.

Thanks
JV


WebFOCUS 8105m
Windows, All Outputs
 
Posts: 133 | Registered: August 23, 2010Reply With QuoteReport This Post
Expert
posted Hide Post
That may be, but this gives you some code that you might be able to incorporate.

The verb doesn't have to be COUNT, it could easily be SUM, PRINT, WRITE etc.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.06 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5608 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Or you can have your claim count per policy hold in a file that will then be JOINed to the more detailed file (Policy/Claim file) where the join is made on Policy#.
That way the same claim count will be repeated to each matching Policy#

Many ways to have what you're looking for


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2191 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Guru
posted Hide Post
Or you can use PARTITION_AGGR:

TABLE FILE CAR
SUM SALES
COMPUTE CNT/I5 = PARTITION_AGGR(SALES, COUNTRY, B, E, CNT);
BY COUNTRY
BY CAR
END


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 405 | Location: Europe | Registered: February 05, 2007Reply With QuoteReport This Post
Expert
posted Hide Post
Good call Frans, but I don't think that was available in 8.1.05?

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.06 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5608 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Guru
posted Hide Post
You're right Tony, overlooked that, it's only in 82xx Versions.


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 405 | Location: Europe | Registered: February 05, 2007Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Thanks to all.

If I don't use COUNT as the Verb it does not seem to work right. Looks like the hold file will work.

As for the PARTITION_AGGR function, looks like another reason to get our upgrade done. We hope to move to 8203 in January 2019.

Thanks again
JV


WebFOCUS 8105m
Windows, All Outputs
 
Posts: 133 | Registered: August 23, 2010Reply With QuoteReport This Post
Expert
posted Hide Post
If you use SUM then use a prefix operator on the field such as CNT.fieldname.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.06 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5608 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Expert
posted Hide Post
Just in case you do not understand, here's a little Seasonal Present for you.

The first parts just create sample data from what you posted.

EX -LINES * EDAPUT MASTER,jv,CV,MEM
FILENAME=jv,SUFFIX=FOC,$
SEGNAME=jv,SEGTYPE=,$
FIELD=POLICYNO,,I11,TITLE='Policy Number',$ 
FIELD=CLAIMNO,,I11,TITLE='Claim Number',$ 
EDAPUT*

CREATE FILE jv
 
MODIFY FILE jv
FREEFORM POLICYNO CLAIMNO
DATA
123456,1,$
123456,2,$
123456,3,$
123456,4,$
123456,5,$
223456,1,$
223456,2,$
223456,3,$
END

TABLE FILE jv
SUM CNT.CLAIMNO WITHIN POLICY AS 'Count'
BY POLICYNO SUBFOOT ""
BY CLAIMNO
ON TABLE SET BYDISPLAY ON
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
grid=off,$
ENDSTYLE
END



T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.06 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5608 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Total Item Count displayed on each duplicate row

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