Showing posts with label dates. Show all posts
Showing posts with label dates. Show all posts

Monday, March 26, 2012

Producing week ending dates for each week of the year

Hi

I am trying to produce a script that will show date for the last day of the week(Sunday). The script will have to show dates for all weeks of the year. Does anyone know how this can be done?

Thanks

Quote:

Originally Posted by rcr69er

Hi

I am trying to produce a script that will show date for the last day of the week(Sunday). The script will have to show dates for all weeks of the year. Does anyone know how this can be done?

Thanks


hai try this-----------
declare
v_date date;
begin
select next_day('01-JAN-07','sunday') into v_date from dual;
for i in 0..51 loop
dbms_output.put_line(to_char(to_date((v_date)+7*i) ));
end loop;
end;sql

Tuesday, March 20, 2012

Processing of Table in a report, delayed based on input parameter

I have input parameters which are dates in my report. My problem is I
have to validate these parameters before I display the table in the
report. Currently I am handling this by using the "Visibility"
property of the table. But I wanted to know is there is any other way,
I can stop the processing of the table till I validate the input date.
Thank You.Your query parameter can be an expression instead of directly mapped to the
dates. Then use code behind reports to validate the dates. Set the date to a
know bogus date that returns no data.
To map to an expression go to data tab, click on the ..., parameters tab.
Pick expression instead of the report parameter.
Another vaiation of the above. Have hidden parameters. Set the value of the
parameter to an expression that references the visible date parameter (and
again use code behind report). Then map this hidden parameter to your query
parameter. This hidden parameter can also be used for visibility. Hide the
data (by setting to a date that returns no data then it would be empty
anyway). Then show a textbox with your comment on why the date is invalid.
The above should at least point you in the right direction. Some of this
will be a hack but you should be able to get something acceptable worked
out.
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
For instance
"ricky" <G.RekhaDevi@.gmail.com> wrote in message
news:55dde3ac-e215-44c3-8a9b-e3f20987e0b8@.i72g2000hsd.googlegroups.com...
>I have input parameters which are dates in my report. My problem is I
> have to validate these parameters before I display the table in the
> report. Currently I am handling this by using the "Visibility"
> property of the table. But I wanted to know is there is any other way,
> I can stop the processing of the table till I validate the input date.
> Thank You.