Focal Point
Year from Date

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

April 09, 2007, 02:02 AM
<Shylaja>
Year from Date
Hi,
i have a drop down box for year, where, the year previous to the current one should be selected by default and 5 year previous to the current one should be populated.
Please help me out in implementing this...

Shylaja.
April 09, 2007, 04:04 AM
Alan B
Shylaja

Are you building your own HTML form or using the layout painter or just auto prompt?


Alan.
WF 7.705/8.007
April 09, 2007, 06:03 AM
<Shylaja>
Hi,
I found a way out... I wrote a query on DB2 that serves the purpose.
The query looks like this:

select emp_yr from
(select distinct emp_yr,ROW_NUMBER() OVER (ORDER BY emp_yr DESC) as rownumber from
(select distinct emp_yr FROM emptab
order by emp_yr desc) as aa ) as bb
where rownumber < 6

I need to convert this query to FOCUS code...
Please help me do this...

Shylaja.
April 09, 2007, 07:39 AM
FrankDutch
Create a master on the query as if the query is a table.

So suppose the query is called "MYYEARSDB2"

You create the acx and the mas by using the tool.
after that you will have a master MYYEARSDB2.MAS and you will be abble to use that "database" in your HTML report as the dynammic source of the drop down list.

Frank




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

April 09, 2007, 11:34 AM
BlueZone
Here is one more solution Shylaja :

<CODE>
-SET &YEAR0 = EDIT(&YYMD,'9999') ;
-TYPE &YEAR0
-*
-REPEAT GETYR FOR &I FROM 1 TO 6 ;
-SET &YEAR.&I = &YEAR0 - &I;
-GETYR
-*
-HTMLFORM BEGIN
<html>
<head><title> abc </title></head>
<body>
Select Year :
<select name="FRMYR">
<option value="!IBI.AMP.YEAR1;"selected>!IBI.AMP.YEAR1;</option>
<option value="!IBI.AMP.YEAR2;">!IBI.AMP.YEAR2;</option>
<option value="!IBI.AMP.YEAR3;">!IBI.AMP.YEAR3;</option>
<option value="!IBI.AMP.YEAR4;">!IBI.AMP.YEAR4;</option>
<option value="!IBI.AMP.YEAR5;">!IBI.AMP.YEAR5;</option>
</select>
</body>
</html>
</CODE>

Goooooooooooooooood day !!
Sandeep Mamidenna


-------------------------------------------------------------------------------------------------
Blue Cross & Blue Shield of MS
WF.76-10 on (WS2003 + WebSphere) / EDA on z/OS + DB2 + MS-SQL
MRE, BID, Dev. Studio, Self-Service apps & a dash of fun !! Music