I am trying to create a way that date related values are available in a drop down for a user to select. I wanted this to be a situation that as the years change, the most recent values were available without recoding a report.
The following code creates the values and descriptions that I would like to use.
I tried to put them in a -PROMPT but then read and found you could not use an ampervariable in a -PROMPT line (or something to that effect).
The distinct dates are in the data. However, there are millions of rows and it takes a very long time for the dropdowns to return the dates available.
I am not using a launch page.
Guy
WebFOCUS 7.6.4 Windows XP against an Oracle Database mainly SCT Banner Higher Education ODS and EDW Various output formats
Guy Brenckle Budget Analyst University of Northern Colorado
February 12, 2009, 12:33 PM
GinnyJakes
I would recommend a launch page. You can populate the date dropdown box by using a procedure that generates the dates in a sorted order and does an ON TABLE PCHOLD FORMAT XML at the end of it.
In your launch page control for the dropdown box, you reference a procedure instead of a master for the source of the list.
Continuing were Ginny left off ... Use any convenient data source with at least 6 records in your 'source procedure': Put as much of the date calculation as you can in DEFINE, rather than -SET.
DEFINE FILE CAR
LIST/I5 WITH CAR = LIST + 1;
THIS_YEAR/I4=&YYMD/10000;
YEAR/I4 = THIS_YEAR + 1 - LIST;
DESCRIPT/A10=EDIT(YEAR,'FALL 9999');
VALUE /A6 =EDIT(YEAR,'999950');
END
TABLEF FILE CAR
PRINT DESCRIPT VALUE
IF RECORDLIMIT EQ 6
ON TABLE PCHOLD FORMAT XML
END
This message has been edited. Last edited by: j.gross,
- Jack Gross WF through 8.1.05
February 16, 2009, 10:23 AM
Guy
I finally got this concept.
Thank you very much.
WebFOCUS 7.6.4 Windows XP against an Oracle Database mainly SCT Banner Higher Education ODS and EDW Various output formats
Guy Brenckle Budget Analyst University of Northern Colorado