Adding StripLines with Report Builder

 Computer, Sharepoint, Software  Comments Off on Adding StripLines with Report Builder
Feb 062014

I have a Forecast/Trending Chart that has past and future dates. I needed to denote Today with a vertical StripLine on the chart. (Click on images for larger version.)


You can add a Marker with an expression easily.


In your series properties; create an expression for your Marker. In my scenario, it was: =IIF(Fields!Date.value = Today(), “Star10”, “None”)
This sets a Star at the Today point on the X axis.
This is just OK, but I needed to make this a little clearer based on the X-Axis interval.

To add a StripLine, click on your X Axis to bring up the properties window and look for the StripLine section under appearance.
Open the ChartStripLine Collection Editor and Add a new stripline.
Give your line a Color and set BorderStyle to Solid. By default it’s Default and won’t show up on your chart.
Set your IntervalOffsetType to Days.
In IntervalOffset; Use an expression to calculate the number of days between the minimum date in your dataset and Today.
The expression in this scenario is: =DateDiff(DateInterval.Day,min(Fields!date.Value), Today())+1