Solved

sql ssrs parameters

Posted on 2008-10-12
3
195 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

624 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