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
October 24, 2017, 02:37 PM
eric.woerle
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
October 24, 2017, 02:47 PM
lhorton3
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
October 24, 2017, 03:04 PM
MartinY
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
October 24, 2017, 04:03 PM
Francis Mariani
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
October 25, 2017, 05:45 AM
Mikel
I think it is not so complicated to insert the "Page Count" and "Page Number" from the App Studio reporting tool.
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
October 25, 2017, 08:34 AM
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.
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
October 25, 2017, 08:53 AM
BabakNYC
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
October 25, 2017, 09:16 AM
Mikel
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
October 25, 2017, 10:05 AM
MartinY
quote:
You're right Martin. My apologies ... In this case, I had not read the question correctly
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