How can I set initial value property of field as To_Char(SYSDATE,'YYYY') ?
719501Aug 27 2009 — edited Sep 23 2009Situation:
I need a way to set the initial value property of a char(4) field in the parameter form
--and it not interfer with a the new value entered.
I have a 10g/web based report that has a :FOR_YEAR input field on the parameter screen.
The year is required to have a initial value of the current year,
So I am doing that with :FOR_YEAR := To_Char(SYSDATE,'YYYY');
In the before form parameter trigger code. That supplies the initial value fine.
The problem:
However the intial value somehow overrides the entered value (example 1996) when the report generates and 2009 is displayed.
--Even though I see the correct year/user_parameter entered value 1996 for :FOR_YEAR
in a srw.message placed in the before report trigger.
This :FOR_YEAR field is set up a user_Parameter and supplies a cursor in the before report trigger
And the year in the report title(a concatenated string applied to a field) in the after parameter form.
:HEADER_1 := 'Top '||To_Char(:FOR_NUMBER)||' Emitting Sources based upon '||:FOR_EMISSION||' Emissions for '||:For_Year;
If I don’t set the intial value at all in the before parameter form, the afterpform code works fine, applying the typed in year.
Aslo, it works fine when ran in report builder, but when placed on the app server and ran on the web
the intial value gegan to override any entered value.
again i want to assign the current year to the initlal vallue property.
any suggestions appreciated!