I have a counter(records) that I display in the footer of my report. it works fine there but when I move it to the header it gives me a count of 1 instead of 7263. I would prefer to display it in the header instead and am perplexed by why it renders correctly in the footer but not the header.
Any input is appreciated and suggestions as to why this behavior occurs would also be appreciated.
DEFINE FILE CAR
CNTR /I4 = 1;
END
TABLE FILE CAR
SUM
DEALER_COST
RETAIL_COST
BY COUNTRY
BY CAR
BY MODEL
ON TABLE SET PAGE-NUM OFF
HEADING
"Heading - number of lines: <TOT.CNTR"
FOOTING
"Footing - number of lines : <TOT.CNTR"
END
WebFOCUS 7.6, 7.7 Windows, All Output formats
May 22, 2013, 12:50 PM
Geoff Fish
Unfortunately neither solution will work for me because I am using a PRINT not SUM. maybe I should have shown more code. This all gets passed to very nice HTML page
DEFINE CNTR = 1 : it is like creating an extra field named CNTR returned with each record in your dataset with a value of 1. If you sum up the values in thise column, you would get the number of records. TOT.CNTR : this gives you the total of CNTR
A COMPUTE as in your original code is applied after the dataset is returned and thus, would not give you the correct number in the HEADING.
So try this ... remember to remove the COMPUTE CNTR statement.
DEFINE FILE AS_ADMISSIONS_APPLICANT
ADDRESS/A160=AS_ADMISSIONS_APPLICANT.AS_ADMISSIONS_APPLICANT.STREET1_LINE1 | ( '' || AS_ADMISSIONS_APPLICANT.AS_ADMISSIONS_APPLICANT.STREET1_LINE2 );
PHONE/A20=AS_ADMISSIONS_APPLICANT.AS_ADMISSIONS_APPLICANT.PHONE_AREA_CODE1 | ( '' || AS_ADMISSIONS_APPLICANT.AS_ADMISSIONS_APPLICANT.PHONE_NUMBER1 );
E_DATE_1/YYMD='&E_DATE';
B_DATE_1/YYMD='&B_DATE';
CNTR/I11=1;
END
TABLE FILE AS_ADMISSIONS_APPLICANT
PRINT
&MEASURES.(AND(,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,)).Measures.
BY &SORTA.(BY(,,,,,,,,,,,)).Sort1.
BY &SORTB.(BY(,,,,,,,,,,,)).Sort1.
BY &SORTC.(BY(,,,,,,,,,,,)).Sort1.
HEADING
"&TOD"
"&DATE "
"&HEADING1"
"&HEADING2"
"Undergraduate Admissions Profile Report"
"For Term &TERM_CODE_KEY Student Type &STYP_CODE "
"Record Count <TOT.CNTR "
FOOTING
"Record Count <CNTR "
Year(s) of experience in WebFOCUS: 5+. Using WebFOCUS 7.7.03 on Windows platform with Oracle/SQL Server.