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] Count Number of Records in Footer

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Count Number of Records in Footer
 Login/Join
 
Member
posted
I am trying to get a count of records in a report (which is a fex that has parameters passed from a html page). I want the Total Number of Records to display at the Report Footer, would I create a Compute or a Define, or how would I accomplish this? If I start adding code into the Report Source it gets corrupted, so I would prefer to work within the App Studio GUI if possible. Thanks!

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


WebFOCUS 8
Windows, All Outputs
 
Posts: 2 | Registered: July 25, 2017Report This Post
Master
posted Hide Post
TABLE FILE CAR
SUM RETAIL_COST
BY COUNTRY
BY CAR
ON TABLE HOLD AS MY_HOLD FORMAT ALPHA
END
-RUN
-SET &MY_LINES = &LINES ;
-SET &MY_RECS = &RECORDS ;

TABLE FILE MY_HOLD
SUM RETAIL_COST
BY COUNTRY
BY CAR
FOOTING
"LINES = &MY_LINES.EVAL"
"RECORDS = &MY_RECS.EVAL"
END


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Report This Post
Member
posted Hide Post
Thanks, but I am trying to do this within the GUI, as I had said that if I add code in the source it breaks my code. My fex has 3 parts (comment, Dialogue Mngr, and Report) - where does this code go in my report? I see many people post code in the Focal Point forums but I do not yet know how this relates to what I am trying to do in the AppStudio GUI. Can anyone elaborate?


WebFOCUS 8
Windows, All Outputs
 
Posts: 2 | Registered: July 25, 2017Report This Post
Virtuoso
posted Hide Post
Eric solution do work but you need to add code that you may not be familiar with.

Following has been built with AS
DEFINE FILE CAR
NB_ROWS/D12=1;
END
TABLE FILE CAR
SUM CAR.BODY.SEATS
    COMPUTE CNTRY_CNT/D12 = IF COUNTRY NE LAST COUNTRY THEN CNTRY_CNT + 1 ELSE CNTRY_CNT; NOPRINT
    NB_ROWS NOPRINT
BY  CAR.ORIGIN.COUNTRY
ON TABLE SUBFOOT
"Nb Record : <CNTRY_CNT Nb Rows Processed : <TOT.NB_ROWS"
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 = endeflt,
$
ENDSTYLE
END

You can copy/paste in WF text editor, save, close then Open with AS.
It may be difficult to explain how to access all different part. You may need TechSupport help. They will be able to connect to your computer and show you how to.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Expert
posted Hide Post
The question to ask is "Why is this complicated to do in the App Studio GUI?". I am interested in the answer.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
I think it is not so complicated to insert the "Page Count" and "Page Number" from the App Studio reporting tool.

App Studio 8.2

Report (menu) ... > Header & Footer (icon) > Page Footer (option) > Insert Page Markers (contextual menu) > Page Count
Report (menu) ... > Header & Footer (icon) > Page Footer (option) > Insert Page Markers (contextual menu) > Page Number


Footing Source
...
FOOTING
"<TABPAGENO / <TABLASTPAGE"
...


Complete example code
SET LINES = 10
TABLE FILE CAR
PRINT
     CAR.BODY.SALES
FOOTING
"<TABPAGENO / <TABLASTPAGE"
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


Regards,
Mikel


WebFOCUS 8.1.05, 8.2.01
 
Posts: 173 | Location: Madrid, Spain | Registered: May 09, 2003Report This Post
Virtuoso
posted Hide Post
Sorry to tell you that Mikel, but it was never been asked to add page number and total page. lhorton3 was asking to add the number of record.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Virtuoso
posted Hide Post
The number of records (i.e. &RECORDS) is a report statistic. So, it's not really known until the answer set is rendered. The best way to find out how many records were used to create that answer set in the footing is to DEFINE a counter that is set to 1 and then use
<TOT.counter   
in the footing.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Platinum Member
posted Hide Post
quote:
Originally posted by MartinY:
Sorry to tell you that Mikel, but it was never been asked to add page number and total page. lhorton3 was asking to add the number of record.

You're right Martin. My apologies ... In this case, I had not read the question correctly.

Although Eric and Martin's solutions work, Martin's solution is more suited to AS.

Thanks, regards.


WebFOCUS 8.1.05, 8.2.01
 
Posts: 173 | Location: Madrid, Spain | Registered: May 09, 2003Report This Post
Virtuoso
posted Hide Post
quote:
You're right Martin. My apologies ... In this case, I had not read the question correctly


Good One
Wink


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report 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] Count Number of Records in Footer

Copyright © 1996-2020 Information Builders