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] Count Number of Records in Footer
Go
New
Search
Notify
Tools
Reply
  
[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, 2017Reply With QuoteReport 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, 2013Reply With QuoteReport 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, 2017Reply With QuoteReport 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: 2330 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport 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, 2005Reply With QuoteReport 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, 2003Reply With QuoteReport 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: 2330 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport 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: 1843 | Location: New York City | Registered: December 30, 2015Reply With QuoteReport 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, 2003Reply With QuoteReport 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: 2330 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Count Number of Records in Footer

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