Solved

sql ssrs parameters

Posted on 2008-10-12
3
188 Views
Last Modified: 2012-05-05
I have a dataset with columns names like projectname,startdate,enddate,client name,resources,status etc.
I am making projectname,startdate,enddate as parameters for my report.when i go and preview my report
and select startdate and enddate i am able to get data only if  i pass the exact dates for that particular project,but i wanted to get data for all the projects that started  between the start and enddates.I have attached a screen shot.I wanted to know how to  write a query to return the data between those two parameter dates

ques.doc
0
Comment
Question by:srirama_rao
  • 2
3 Comments
 

Author Comment

by:srirama_rao
ID: 22700276
Hi,
  My only problem is i got to retrieve all data which falls between  startdate and enddate parameters.
Right now if i run my report i am able to get data that exactly matches startdate and enddate in my database
which is not what i wanted.Any help is appreciated.
0
 
LVL 39

Accepted Solution

by:
BrandonGalderisi earned 500 total points
ID: 22704312
In your query, which should be a stored procedure, you just pass in @startDate and @EndDate and then do your logic in your where clause



where ((@StartDate between startDate and enddate)
       or (@endDate between startdate and enddate))


This will allow you to find items that overlap with either date.
0
 

Author Comment

by:srirama_rao
ID: 22708937
Hi Brandon,
    Thanks for your help.This where clause is not fetching me right records(i mean all the project names that falls between the start and end dates).It is getting all the records that are out the date range also.I am attaching a screen shot pls look at the dates(which are  out of range)
ques.doc
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now