Thursday, March 29, 2012

End User Filter Option

I am using RS 2005. Here is my questionâ?¦ I have two different date fields
(FileDate and TransDate) in my query and I want to give end user an option to
filter either one i.e on filedate or on Transdate and also a date range in
where clause. Is this possible? If so. How can I implement this
functionality?manipulate the information on the datasource side.
your datasource must be a stored proc created in such a way that if
filedate is null then use transdate.
eg.
create proc mydataset @.filedate datetime = null, @.transdate datetime =null
as
if @.filedate is null
begin
select fields from table where transdate = @.transdate
end
else
begin
select fields from table where filedate = @.filedate
end
Reddy wrote:
> I am using RS 2005. Here is my question... I have two different date fields
> (FileDate and TransDate) in my query and I want to give end user an option to
> filter either one i.e on filedate or on Transdate and also a date range in
> where clause. Is this possible? If so. How can I implement this
> functionality?

No comments:

Post a Comment