0
votes

I've created a range bar chart using SSRS 2008.

It is a date range

StartDate is =DateAdd("yyyy",-2,Today())

EndDate is =DateAdd("yyyy",2,Today())

What I want to achieve is, I want the grid-line for only Today()'s date.

Is there any way to achieve it? I don't know what expressions to give for Interval properties.

Thanks!! Any help is appreciated.

2

2 Answers

1
votes

Use StripLine to achieve this. View the properties for the horizontal axis. Locate StripLines and click on collections. Add a member and set to the following:

Set a Background Color (e.g. Green)

BorderStyle (e.g. Solid)

Interval: Auto

IntervalOffset: =Today().ToOADate

IntervalOffsetType: Days

IntervalType: Years

StripWidth: .5

StripWidthType: Days

0
votes

I do not think there is direct way achieving your goal. However, you could use calculated value and use it as a tiny bar chart.

  1. Create new calculated value with value of 100
  2. Make sure calculataed field is on top of the values
  3. Put calculated value on Secondary Axis
  4. Change Chart Type to Bar Chart
  5. Adjust the size to your needs. The example below: PointWidth = 0.01
  6. Use Color Expression of the bar value that is similar to below:

=IIF(Format(Fields!timeStart.Value, "Short Date")=Format(Today(),"Short Date"), "Red", "White")

Your new chart should look something like this:

enter image description here