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.
DEFINE FILE SQLOUT
DUMMY/A1 = ' ';
END
TABLE FILE SQLOUT
BY DUMMY NOPRINT
-SET &LicenseNumber = IF &LicenseNumber EQ '' THEN FOC_NONE ELSE &LicenseNumber;
-SET &StartDate = IF &StartDate EQ '' THEN FOC_NONE ELSE &StartDate;
-SET &TaxPeriod = IF &TaxPeriod EQ '' THEN FOC_NONE ELSE &TaxPeriod;
WHERE ( Tax_period EQ '&TaxPeriod');
WHERE ( License_no EQ '&LicenseNumber');
WHERE ( Refund_Date FROM DT(&StartDate) TO DT(&EndDate) );
PRINT
License_no AS 'License,Number'
Trade_Name AS 'Trade,Name'
Legal_Name AS 'Legal,Name'
Tax_period AS 'Tax,Period'
Refund_Amount AS 'Refund,Amount'
Refund_Date/HMDYY AS 'Refund,Date'
SAP_Transmittal_Number AS 'SAP,Transmittal,Number'
BY DUMMY NOPRINT
ON DUMMY SUBFOOT
"Total Refunds: &LINES "
HEADING
"Refund Report:&DATEMDYY "
Why is this &LINES not working on the Total refunds line? What am I missing?
All I want to do is count the number of lines on the report. Should be simple so I must be missing something easy.
Thanks a bunch for the help.This message has been edited. Last edited by: Kerry,
TABLE FILE CAR
SUM
SALES
BY COUNTRY
ON TABLE SUBFOOT
"TOTAL LINES: !IBI.AMP.LINES;"
ON TABLE HOLD AS H001 FORMAT HTMTABLE
END
-RUN
-HTMLFORM BEGIN
!IBI.FIL.H001;
-HTMLFORM END
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
&LINES, is not calculated until AFTER the table file. You could:
TABLE FILE SQLOUT
BY DUMMY
ON TABLE HOLD
END
-RUN
-SET &TOTLINES=&LINES;
TABLE FILE SQLOUT
.
.
.
ON DUMMY SUBFOOT
"Total Refunds: &TOTLINES "
OR AN EASIER SOLUTION:
TABLE FILE SQLOUT
SUM COMPUTE CNTR/I4=CNTR+1; NOPRINT
BY DUMMY
.
.
.
.
ON DUMMY SUBFOOT
"Total Refunds: <ST.CNTR "
This message has been edited. Last edited by: Kerry,
Posts: 17 | Location: Colorado, USA | Registered: January 22, 2010
Have you tried creating a define field. Try this version of your report. /* DEFINE FILE SQLOUT DUMMY/A1 = ' '; RECORD_COUNT/I9=1; END TABLE FILE SQLOUT BY DUMMY NOPRINT -SET &LicenseNumber = IF &LicenseNumber EQ '' THEN FOC_NONE ELSE &LicenseNumber; -SET &StartDate = IF &StartDate EQ '' THEN FOC_NONE ELSE &StartDate; -SET &TaxPeriod = IF &TaxPeriod EQ '' THEN FOC_NONE ELSE &TaxPeriod; WHERE ( Tax_period EQ '&TaxPeriod'); WHERE ( License_no EQ '&LicenseNumber'); WHERE ( Refund_Date FROM DT(&StartDate) TO DT(&EndDate) ); PRINT License_no AS 'License,Number' Trade_Name AS 'Trade,Name' Legal_Name AS 'Legal,Name' Tax_period AS 'Tax,Period' Refund_Amount AS 'Refund,Amount' Refund_Date/HMDYY AS 'Refund,Date' SAP_Transmittal_Number AS 'SAP,Transmittal,Number' BY DUMMY NOPRINT ON DUMMY SUBFOOT "Total Refunds: HEADING "Refund Report:&DATEMDYY "
*/
WF 7.6.11 Oracle WebSphere Windows NT-5.2 x86 32bit
ENGINE SQLMSS SET DEFAULT_CONNECTION LCIGAR
SQL SQLMSS PREPARE SQLOUT FOR
select TV.License_no, CL.Trade_Name, CL.Legal_Name, TV.Tax_period, TV.Transaction_Amount as 'Refund Amount', TV.Transaction_DTTM as 'Refund Date',
TV.DLN as 'SAP Transmittal Number' from transactionView TV
inner join clgninfo CL on TV.License_no = CL.license_no
where transaction_type = 'D'
order by TV.License_no, TV.Transaction_DTTM
;
END
TABLE FILE SQLOUT
ON TABLE HOLD
END
-RUN
-SET &TOTLINES=&LINES;
TABLE FILE SQLOUT
-SET &LicenseNumber = IF &LicenseNumber EQ '' THEN FOC_NONE ELSE &LicenseNumber;
-SET &StartDate = IF &StartDate EQ '' THEN FOC_NONE ELSE &StartDate;
-SET &TaxPeriod = IF &TaxPeriod EQ '' THEN FOC_NONE ELSE &TaxPeriod;
WHERE ( Tax_period EQ '&TaxPeriod');
WHERE ( License_no EQ '&LicenseNumber');
WHERE ( Refund_Date FROM DT(&StartDate) TO DT(&EndDate) );
PRINT
License_no AS 'License,Number'
Trade_Name AS 'Trade,Name'
Legal_Name AS 'Legal,Name'
Tax_period AS 'Tax,Period'
Refund_Amount AS 'Refund,Amount'
Refund_Date/HMDYY AS 'Refund,Date'
SAP_Transmittal_Number AS 'SAP,Transmittal,Number'
BY DUMMY NOPRINT
ON DUMMY SUBFOOT
"Total Refunds: &TOTLINES "
HEADING
"Refund Report:&DATEMDYY "
I tried this last suggestion and I have no idea why I cannot get this to work.
First of all can you please show us the reults of your report? Another thing, you will only get the correct reuslts if you use the same selection criteria in both reports. Otherwise, the first report will give you the count of all the records on your output file and not the ones that matc hyour selection cirteria.
WF 7.6.11 Oracle WebSphere Windows NT-5.2 x86 32bit
DEFINE FILE SQLOUT
DUMMY/A1 = ' ';
END
TABLE FILE SQLOUT
BY DUMMY NOPRINT
-SET &LicenseNumber = IF &LicenseNumber EQ '' THEN FOC_NONE ELSE &LicenseNumber;
-SET &StartDate = IF &StartDate EQ '' THEN FOC_NONE ELSE &StartDate;
-SET &TaxPeriod = IF &TaxPeriod EQ '' THEN FOC_NONE ELSE &TaxPeriod;
WHERE ( Tax_period EQ '&TaxPeriod');
WHERE ( License_no EQ '&LicenseNumber');
WHERE ( Refund_Date FROM DT(&StartDate) TO DT(&EndDate) );
ON TABLE HOLD
END
-RUN
-SET &TOTLINES=&LINES;
TABLE FILE SQLOUT
PRINT
License_no AS 'License,Number'
Trade_Name AS 'Trade,Name'
Legal_Name AS 'Legal,Name'
Tax_period AS 'Tax,Period'
Refund_Amount AS 'Refund,Amount'
Refund_Date/HMDYY AS 'Refund,Date'
SAP_Transmittal_Number AS 'SAP,Transmittal,Number'
BY DUMMY NOPRINT
ON DUMMY SUBFOOT
"Total Refunds: &TOTLINES "
HEADING
"Refund Report:&DATEMDYY "
OK i changed things up a bit in the code but im getting a "0" for &TOTLINES even though there are 3 records showing up on the report.
Am I missing something? Why all the holds and parameters?
TABLE FILE IBISAMP/EMPDATA
SUM COMPUTE CNTPIN/I9 = CNT.PIN; NOPRINT
PRINT *
BY DEPT
HEADING
"TOTAL RECORDS <TOT.CNTPIN"
ON TABLE SUBFOOT
"CNT <TOT.CNTPIN"
END
"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
TABLE FILE IBISAMP/EMPDATA
SUM COMPUTE CNTPIN/I9 = CNT.PIN; NOPRINT
SUM SALARY COMPUTE CNTROWS/I9 = 1; NOPRINT
BY DEPT
HEADING
"TOTAL RECORDS <TOT.CNTPIN"
ON TABLE SUBFOOT
"CNT <TOT.CNTPIN <ST.CNTROWS"
END
"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott