Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

sql ssrs parameters

Posted on 2008-10-12
3
Medium Priority
?
199 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 2000 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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

So every once in a while at work I am asked to export data from one table and insert it into another on a different server.  I hate doing this.  There's so many different tables and data types.  Some column data needs quoted and some doesn't.  What …
Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

722 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