Solved

sql ssrs parameters

Posted on 2008-10-12
3
189 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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Server Set bit value based on sums 4 47
SQL Merige returns error code when updating 15 51
Query - which index being used? 2 46
SQL Server Degrading on Write 13 63
This article will describe one method to parse a delimited string into a table of data.   Why would I do that you ask?  Let's say that you need to pass multiple parameters into a stored procedure to search for.  For our sake, we'll say that we wa…
If you having speed problem in loading SQL Server Management Studio, try to uncheck these options in your internet browser (IE -> Internet Options / Advanced / Security):    . Check for publisher's certificate revocation    . Check for server ce…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …

930 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

12 Experts available now in Live!

Get 1:1 Help Now