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     [NFR opened] Count of unique records, in report header

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[NFR opened] Count of unique records, in report header
 Login/Join
 
Gold member
posted
Hi,

Similarly to TRue's question, I'm trying to find out how I can put a count distinct in the header of a report.

As mentioned, a sub footer can be used in conjunction with a compute to achieve this,
but this approach:
- consistently returns 1 in a sub header
- consistently returns 1 in a report header
- generates an error when used in a report footer

--> How can I create a 'report summery' at the top of my report containing count distincts?

Regards,
Peter

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


Prod: WebFOCUS 8.0.06 on Win2008/Tomcat7/LDAP Mode
Test: WebFOCUS 8.0.06 on Win2008/Tomcat7/LDAP Mode
 
Posts: 59 | Registered: April 23, 2012Report This Post
Master
posted Hide Post
Here's one way:
 TABLE FILE CAR
 COUNT DST.COUNTRY
 ON TABLE SAVE
 END
 TABLE FILE CAR
 COUNT DST.CAR
 ON TABLE SAVE AS SAVE1
 END
 TABLE FILE CAR
 COUNT DST.MODEL
 ON TABLE SAVE AS SAVE2
 END
-RUN
-READ SAVE &COUNTRY.5.
-READ SAVE1 &CAR.5.
-READ SAVE2 &MODEL.5.
-RUN
 TABLE FILE CAR
 HEADING
 "DISTINCT COUNTRIES: &COUNTRY"
 "DISTINCT CARS: &CAR"
 "DISTINCT MODELS: &MODEL"
 PRINT COUNTRY CAR MODEL SALES
 END


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report This Post
Silver Member
posted Hide Post
For those who are on later releases (like Peter on WF8.0.01), below is jgelona's code in a more streamlined version. This is taking advantage of two newer features:

Multiple Distincts in one TABLE FILE
and
-READFILE

Here's the code:

TABLE FILE CAR
SUM CNT.DST.COUNTRY
    CNT.DST.CAR
    CNT.DST.MODEL
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS DISTINCT FORMAT BINARY
END
-RUN
-READFILE DISTINCT
TABLE FILE CAR
HEADING
"Distinct Countries: &COUNTRY "
"Distinct Cars: &CAR "
"Distinct Models: &MODEL "
PRINT COUNTRY CAR MODEL SALES
END  


WF 8.2.03
Win10 / IE11 / Chrome
HTML EXL2K PDF et. al.
 
Posts: 5 | Registered: October 15, 2012Report This Post
Master
posted Hide Post
@David Beagan

Owh man!

Didn't knew that. It's not in help ( index ) only when you search you'll find readfile.
Great, thanks!

But I do have a warning about using multiple cnt.dst in one TABLE.

Try this:
TABLE FILE CAR
SUM CNT.DST.COUNTRY
    CNT.DST.CAR
    CNT.DST.SEATS
ON TABLE PCHOLD FORMAT HTML
END

TABLE FILE CAR
SUM COMPUTE CD_COUNTRY/I11 = CNT.DST.COUNTRY;
    COMPUTE CD_CAR/I11 = CNT.DST.CAR;
    COMPUTE CD_SEATS/I11 = CNT.DST.SEATS;
ON TABLE PCHOLD FORMAT HTML
END


Although it seems this will give the same result... ...it doesn't. ( not on our environment anyways )


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Gold member
posted Hide Post
Thank you all for the responses.

I had hoped there was a way for an InfoAssist user to show report totals in the header without having to resort to hold-files, but I see this is not possible (for now).

+Note+: The suggestions made make use of -READ & -READFILE, but from what I can tell - these are options not available in InfoAssist 8.0.01 or 8.0.02


Prod: WebFOCUS 8.0.06 on Win2008/Tomcat7/LDAP Mode
Test: WebFOCUS 8.0.06 on Win2008/Tomcat7/LDAP Mode
 
Posts: 59 | Registered: April 23, 2012Report This Post
<MLerner>
posted
Peter,
Please open a new feature request and perhaps we can get this automated for you in a future release.

Regards,
Matthew
 
Report 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     [NFR opened] Count of unique records, in report header

Copyright © 1996-2020 Information Builders