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.
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, PeterThis 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
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, 2006
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.
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, 2010
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