Solved

How to substract date tin SSRS Report

Posted on 2011-03-13
6
803 Views
Last Modified: 2012-05-11
I want to substract the dates in run time in SSRS report, ex:- if I choose end date as 13th of this month, then Start date should be 7th of this date, and I do not want to select the start date, it will automatically substract 6 days from 13th and report will show the data from period 7th to 13th. Please let me know the if it possilbe of not, & How.
0
Comment
Question by:prashant04
[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
  • 3
  • 2
6 Comments
 

Author Comment

by:prashant04
ID: 35125267
Nothing
0
 
LVL 11

Accepted Solution

by:
shorak earned 125 total points
ID: 35127308
select non-query from the start date parameter properties and put this expression in the textbox:

=DateAdd("d", -6, Parameters!Enddate.Value)

where parameters!Enddate.Value is the end date parameter (replace 'Enddate' with the name of your parameter)

You must also order your parameters so the the end date is requested first else this wont work.
0
 

Author Comment

by:prashant04
ID: 35127537
Hi,

I have one more doubt,

Will the date automatically change when, I change the end date after running the report 1st time.
0
On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

 
LVL 2

Expert Comment

by:swadhinray
ID: 35134054
When you select the date parameter as End Date that can be used to show all data from last 7 days.

Ex: In the expression if you select Today() it will be “14th March 2011”

So for between condition you have pass the same parameter “BETWEEN Today()-6 AND Today()”
It will be taken as “08th March 2011” AND “14th March 2011”

It depends what control you are using in the Report
0
 
LVL 2

Expert Comment

by:swadhinray
ID: 35143719
@prashant04: Yes the date automatically change each and every time when you run.
0
 

Author Closing Comment

by:prashant04
ID: 35144140
I have applied the same before, but the sugesstion given by him was good
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Time Corrections for Reports Working with a report, we made some interesting discoveries about the time corrections/updates We are using the following Parameters: Starting Entered Date (Date) formatted as Data type: "Date/Time" Ending Entered …
Introduction In the following article I’ll be discussing and demonstrating several different ways of how images can be put on a report. I’m using SQL Server Reporting Services 2008 R2 CTP, more precisely version 10.50.1352.12, but the methods ex…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

626 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