Focal Point
[SOLVED] found records but report is not display on screen.

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/7647008136

June 28, 2013, 11:26 AM
DTIC
[SOLVED] found records but report is not display on screen.
How can I debug this problem. WF found two records but report was not display on screen. WF spool out code below on the screen.

TABLE FILE CVAT_LCTC_FUNDING_VW
PRINT
CVAT_LCTC_FUNDING_VW.CVAT_LCTC_FUNDING_VW.LAB_CORE_TECHNICAL_COMPETENCY_CODE
CVAT_LCTC_FUNDING_VW.CVAT_LCTC_FUNDING_VW.FISCAL_YEAR
CVAT_LCTC_FUNDING_VW.CVAT_LCTC_FUNDING_VW.FUNDING_AMT
WHERE ORG_SOURCE_COMPONENT_CODE NE 'EF' AND ORG_SOURCE_COMPONENT_CODE NE 'EA' AND ORG_SOURCE_COMPONENT_CODE NE 'EN';
WHERE FISCAL_YEAR EQ 2015 OR 2014
ON TABLE HOLD AS LCTCHOLD
END
-RUN
0 NUMBER OF RECORDS IN TABLE= 2 LINES= 2
-*------------------------------------------------------------------------------------------
-* Define Prior Amount and create report output based on &OUTPUT
-*------------------------------------------------------------------------------------------
DEFINE FILE LCTCHOLD
PRIOR_AMT/P16CM= IF (LAB_CORE_TECHNICAL_COMPETENCY_CODE EQ LAST LAB_CORE_TECHNICAL_COMPETENCY_CODE)
AND (FISCAL_YEAR EQ 2015) THEN LAST FUNDING_AMT ELSE 0;
END
TABLE FILE LCTCHOLD
SUM
LCTCHOLD.FUNDING_AMT/P16CM AS '2015,Funding'
LCTCHOLD.PRIOR_AMT AS '2014,Funding'
COMPUTE DIFF_AMT/P16CM = FUNDING_AMT - PRIOR_AMT; AS 'Delta'
BY LCTCHOLD.LAB_CORE_TECHNICAL_COMPETENCY_CODE AS 'Lab Core,Technical Competency'
-*WHERE TOTAL LCTCHOLD.FISCAL_YEAR EQ &FISCAL_YEAR;
WHERE TOTAL FISCAL_YEAR EQ 2015;
END
-RUN
1
0 NUMBER OF RECORDS IN TABLE= 2 LINES= 0
-IF 2 NE 0 GOTO DONE;
-DONE

This message has been edited. Last edited by: <Kathryn Henning>,


Webfocus 7.7.02, Win 7,Pdf, Excel, HTML
June 28, 2013, 11:28 AM
Tom Flynn
Print out LCTCHOLD - Bet they are both 2014 records... 2 Records, Zero Lines...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
June 28, 2013, 11:33 AM
RSquared
TRy changing
/*
WHERE TOTAL FISCAL_YEAR EQ 2015;
*/

to
/*
WHERE FISCAL_YEAR EQ 2015;

*/

you probably do not want to total the fiscal year.


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
June 28, 2013, 12:08 PM
DTIC
Tom,
You are right in HOLD file has two records both have Fiscal year 2014. How can I resolve this problem. Thanks

I do need this condition WHERE TOTAL


Webfocus 7.7.02, Win 7,Pdf, Excel, HTML
June 28, 2013, 12:15 PM
DTIC
here is source code. Pass parameter &Fiscal_Year it works fine except &Fiscal_Year = 2015 hold file contained two records with same Fiscal year 2014. I tried use PRINT or SUM. it is not work.

DEFINE FILE LCTCHOLD
PRIOR_AMT/P16CM= IF (LAB_CORE_TECHNICAL_COMPETENCY_CODE EQ LAST LAB_CORE_TECHNICAL_COMPETENCY_CODE)
AND (FISCAL_YEAR EQ &FISCAL_YEAR) THEN LAST FUNDING_AMT ELSE 0;

TABLE FILE LCTCHOLD
PRINT
LCTCHOLD.FUNDING_AMT/P16CM AS '&FISCAL_YEAR,Funding'
LCTCHOLD.PRIOR_AMT AS '&PRIORYR,Funding'
COMPUTE DIFF_AMT/P16CM = FUNDING_AMT - PRIOR_AMT; AS 'Delta'

BY LCTCHOLD.LAB_CORE_TECHNICAL_COMPETENCY_CODE AS 'Lab Core,Technical Competency'
WHERE TOTAL LCTCHOLD.FISCAL_YEAR EQ &FISCAL_YEAR;


Webfocus 7.7.02, Win 7,Pdf, Excel, HTML
June 28, 2013, 01:40 PM
RSquared
Why are you totaling the Year? not an amount


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
June 28, 2013, 05:01 PM
DTIC
I try to put friendly message below. However it will not work for the case WHERE Condition in TABLE FILE HOLD is not match
parameter user input even in hold file has some records. Then it always go to LABEL DONE and spool out source code on screen display screen.
how can I change the code below to capture friendly message "No Records match your selection criteria."


-IF &RECORDS NE 0 GOTO DONE;
-MRNOEDIT BEGIN
-HTMLFORM no_records_small.htm
-MRNOEDIT END


Webfocus 7.7.02, Win 7,Pdf, Excel, HTML
June 28, 2013, 05:29 PM
DTIC
Thanks all I figured it out. instead of use &RECORDS change it to &LINES. Then if it will not print out source code when condition is not match.

-IF &RECORDS NE 0 GOTO DONE;
-IF &LINES NE 0 GOTO DONE;
-MRNOEDIT BEGIN
-HTMLFORM no_records_small.htm
-MRNOEDIT END


Webfocus 7.7.02, Win 7,Pdf, Excel, HTML