Home » Developer & Programmer » Reports & Discoverer » Report dosent work when we format the date in Query ???
icon8.gif  Report dosent work when we format the date in Query ??? [message #222964] Wed, 07 March 2007 01:27
oracleraj.s
Messages: 13
Registered: February 2007
Junior Member
I am running a report where i am passing a date field (The format is : 07/03/2007)to a table (The column here is of Varchar2(240))from the report interface form.
In the Before Report trigger iam fetching the value in a variable :REP_VALUE_1(Varchar2(240) and formated it back to date.

SRW.MESSAGE(100, :REP_VALUE_1); ==> 07-Mar-07 (Why it comes in this format though we have sent in as 07/0/2007)

:P_AS_OF_DT := TO_DATE(:REP_VALUE_1,'DD/MM/YYYY');

SRW.MESSAGE(200, :P_AS_OF_DT); ==> 07-Mar-07 (Why it displays in the same format though we have formatted to DD/MM/YYYY)

Also iam using the date in my INLINE main query. (Function used in a Main Qry)

F_GET_ACNT_YEAR(TO_DATE(:REP_VALUE_1,'DD/MM/YYYY'),:M_COMP_CODE,LSP_LOCN_CODE)

Now this qry dosent return any value though there are lot many.

If i remove the formatting in the above function then it works well.

But... this is happens for one environment (Customer) whereas the other Customers working well with the same query.

I think some changes has to be done in Server setup to format the date correctly. Pls help me in this....

I tried these things..

select name,value from v$parameter where name='nls_date_format' ==> Value is NULL for this parameter

THEN i tried this....alter session set nls_date_format = 'DD/MM/YYYY'

after this also the select name,value from v$parameter where name='nls_date_format' was showing NULL only.

select parameter, value from nls_session_parameters where parameter = 'NLS_DATE_FORMAT' is giving me DD/MM/YYYY
Previous Topic: Report Triggers in D2K
Next Topic: How to open an Oracle Report from a JSF Page
Goto Forum:
  


Current Time: Tue Nov 26 16:40:57 CST 2024