Focal Point
[CLOSED] Need calculation coding help

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

August 31, 2009, 04:32 PM
MO Admin
[CLOSED] Need calculation coding help
I am trying to debug a launch page that was previously working.

The code pulls a 2 digit month and a 4 digit year from a view, then puts them together. Then depending on the year/month combo the user picks (for start date), it then calculates and displays that date and the option for the next 11 months. ie: If you pick 2008/11 for the start date, you have options of 2008/11, 2008/12, 2009/01, 200902, etc, for 11 months.
If no rows make it though that check it reverts to a error message.

Recently, no rows are making it, so there is nothing to choose from. Checked the view, and there are dates in it. The code to me looks right, but I am not very familiar with it. Anyone have any ideas?

-DEFAULT &FROM_YEAR = '2003';
-DEFAULT &FROM_MONTH = '08';

-SET &YRMNTH = '&FROM_YEAR.EVAL'||'&FROM_MONTH.EVAL';

SQL SQLDBC
SELECT DISTINCT YR, MNTH FROM DMODOR_RPT.V_FINDINGS_COLLECTIONS
-IF &FROM_YEAR EQ ' ' THEN GOTO SKPFIL;
WHERE cast(YR||MNTH as date format 'YYYYMM') BETWEEN cast('&YRMNTH' as date format 'YYYYMM')
AND cast('&YRMNTH' as date format 'YYYYMM') + INTERVAL '11' MONTH
AND YR <> '0000'
-SKPFIL
;
TABLE FILE SQLOUT
PRINT YR MNTH
ON TABLE HOLD AS YEARS FORMAT FOCUS
END
-RUN
-IF &RECORDS EQ 0 THEN GOTO NODATA;

-NODATA
-HTMLFORM BEGIN
No forward years/Months
-HTMLFORM END
-EXIT

This message has been edited. Last edited by: Kerry,


Kevin
______________________
Production: WebFocus 7.6.11 on Win2K3 Server
Test: WebFocus 7.6.11 on Win2K3 Server
Formats: Excel2K, PDF, HTML
August 31, 2009, 04:42 PM
Prarie
Have some date formats changed?
Take the where statment out and see what the data looks like.


In Focus since 1993. WebFOCUS 7.7.03 Win 2003