date parameter [message #149228] |
Wed, 29 March 2006 11:29 |
Eclipse User |
|
|
|
Originally posted by: almasalki.hotmail.com
hi for all
how can used parameter from date(datatype)
can you tell me what is the format of the default value, give me an
example,and if I use this default value with quote or without
thanks in advance
|
|
|
Re: date parameter [message #149243 is a reply to message #149228] |
Wed, 29 March 2006 12:04 |
Eclipse User |
|
|
|
Originally posted by: r.budner.abg.com.pl
Abo Alnnor napisał(a):
> hi for all
> how can used parameter from date(datatype)
> can you tell me what is the format of the default value, give me an
> example,and if I use this default value with quote or without
>
> thanks in advance
>
1. dataset parameter default value (example)(use without quotes):
new Date()
2. report parameters (use without quotes) must follow the format:
MM/DD/YYYY hh:mm:ss AM/PM
for example:
03/29/2006
|
|
|
Re: date parameter [message #149274 is a reply to message #149228] |
Wed, 29 March 2006 14:37 |
Eclipse User |
|
|
|
Originally posted by: r.budner.abg.com.pl
Abo Alnnor napisał(a):
> hi for all
> how can used parameter from date(datatype)
> can you tell me what is the format of the default value, give me an
> example,and if I use this default value with quote or without
>
> thanks in advance
>
As a matter of fact I don't know what you mean. Do you ask about
parameters passed in URL or in IDE ??
|
|
|
Re: date parameter [message #149372 is a reply to message #149243] |
Thu, 30 March 2006 09:15 |
Eclipse User |
|
|
|
Originally posted by: almasalki.hotmail.com
thanks
I mean the parameters in the data set,let me expalin
when I write my query, I put this condition in the where clause:
where to_char(reservation.reservation_Date,'01/29/2005')=?
and I define parameter(def_res_date) from datatype(string)and default
value '05/21/2004'.
now in the report parameter, I define the parameter (Res_Date) from
datatype(String) and use it as value to def_res_date
can you help me where is the problem(I use oracle database)
|
|
|
Re: date parameter [message #149395 is a reply to message #149372] |
Thu, 30 March 2006 13:11 |
Eclipse User |
|
|
|
Originally posted by: r.budner.abg.com.pl
Abo Alnnor napisał(a):
> thanks
> I mean the parameters in the data set,let me expalin
> when I write my query, I put this condition in the where clause:
> where to_char(reservation.reservation_Date,'01/29/2005')=?
>
> and I define parameter(def_res_date) from datatype(string)and default
> value '05/21/2004'.
>
> now in the report parameter, I define the parameter (Res_Date) from
> datatype(String) and use it as value to def_res_date
>
> can you help me where is the problem(I use oracle database)
>
>
Ok, now it's clear what you want to achieve.
I suggest doing:
1. change where clause to:
WHERE reservation.reservation_date = :p_def_res_date
or
WHERE trunc(reservation.reservation_date) = :p_def_res_date
only if your allow to store time information in
reservation.reservation_date column
2. create dataset parameter
name: p_def_res_date
data type: Date Time
direction: Input
Default Value: new Date()
Don't worry about default value, it will be overwritten by reports
parameter value. It is needed to show Preview Results only.
Don't forget about right order of parameter as they appear in the query
text.
3. create report parameter
name: p_res_date
data type: DateTime
display type: Text Box
Default value: 05/21/2004
Format string as: Custom (you have to change it - press Change... button
and enter format for example: dd-MM-yyyy
or any other that is popular in your country)
And that's it. You have to bind your report parameter with dataset
parameter. Do it on your report item binding tab.
Robert
|
|
|
Powered by
FUDForum. Page generated in 0.02811 seconds