SSRS StripLine Middle date X Axis - reporting-services

I am trying to display a vertical stripline in SSRS2008.
In this case I would like to display the line the 4th May (Center of the chart)
I don't know how to define the center date of the x axis in an expression.

You can calculate the centre date with a combination of DateAdd and DateDiff.
=DateAdd(DateInterval.Day,
DateDiff(DateInterval.Day, Min(Fields!DTE.Value), Max(Fields!DTE.Value))/2,
First(Fields!DTE.Value)).ToOADate -0.5
The .ToOADate appears to be necessary to make the StripLine placement work in SSRS 2008 R2. The -0.5 is to get the StripLine to start between two dates, instead of exactly on the centre date.
In your StripLine properties, add the above expression to the IntervalOffset and set the StripWidth to 1. Leave the other properties in the Interval category as Auto.

Related

SSRS bar chart bar spanning multiple axis

I have a basic bar chart to show number of claims received by month. For most clients it shows normally:
normal
But for some the bars span across multiple axis points.
bar span
I have formatted the axis so that it spans the previous 13 months from the report month end date as such:
axis options
expression for the minimum interval is:
=DateAdd(dateinterval.Month,-13,Parameters!prm_month_end.Value)
the axis labels are on auto-fit but disabling them doesn't make a difference. I don't think its my SQL statement but all it is is a simple count of claims by month.
Any thoughts?
Update: I fixed it. I set the maxpixelpointwidth to 50:
maxpixelpointwidth
Updated Chart

SSRS Range charts series positon

I have created a gantt chart using range bar but the series is never positioning at 0. Although intervals and duration is dynamic but I want the series to start from axis. Which property needs to be modified for this.
In the below image the series starts from 6th Oct where has the minimum available start date is 3rd Oct so the graph should start with minimum available date to the maximum available end date which is start date + duration.
Which property should be modified to make it in-line
After making interval changes the axis is aligned worth the data but I need 3rd Oct to be the initial value not the 1st Oct. There is a wastage of space in the beginning(marked with red)
see below:
Click on horizontal axis properties, select axis type is scalar, click on always include zero,
change the minimum value from auto to =Min(startdate),
change interval from auto to 1 and interval type to days.

ssrs chart axis labels duplicated

I am trying to get my chart to only show the month name. I have changed the horizontal axis options to do that but they are all duplicated. Can anyone tell me how I can get this set up to only show each month one time?
Here is the chart without any formatting:
It correctly shows the 4 data points.
I then go to the Horizontal Axis properties, change it to number and then select the MMM for the three character month name which correctly displays:
when I run the report after making that change I get an extra month (december) and all the month names are duplicated:
What do I need to do so that I only get Jan - Apr one time on my horizontal axis?
Thanks for any suggestions!
Leslie
edit: Here is the raw data:
I have tried changing the interval but have seen no effect on the output. I have tried unselecting the "Always include zero" option to get rid of december but that didn't work either.
edit 2: I said above there was no effect when I changed the axis interval to 1, actually that results in many entries for the Year-Month data in the axis area.
Right click on horizontal axis, select axis property, from the "Axis range and interval", for interval, type in "1" (without quotes), for interval type, select "Month", then hit OK. enter image description here

SSRS - Major/minor gridlines spacing

I have an SSRS report with a bar chart with multiple series by CountryName Category group. What I want to do is have gridlines which split each country like below:
However in SSRS the major gridlines seem to interval with the line in the middle of the country name when the grid interval is set to 1 like below:
Can someone point me in the right direction into how to rectify this?
Also is there a way of adding the X axis in SSRS to start from zero like I have in my first graph?
Thanks
You can do it, there is an offset property on the grid lines (horizontal and vertical are separate). Click one one of the gridlines and look in the properties pane. Change the offset to 0.5.
Gives you this.
I'm not sure what you meant about starting from zero on the X-Axis, you have negative values so you'll start from a negative number. If you meant you wantde zero aligned to the middle. You can do that to. You need to set the min and max values of the horizontal axis to the following
Min Value:
=MAX(ABS(Fields!MyValueField.Value), "MyDataSet")*-1
Max Value will be:
=MAX(ABS(Fields!MyValueField.Value), "MyDataSet")
Basically we take the ABSolute largest value and use that as the extent (*-1 for the min value). The problem is that zero might not show so you'll have to play around with the Axis properties maybe to get that working. I'm sure it's possible but I don't have time to test at the moment.
My test data is not great as the number are large

SSRS - range bar chart highlight today gridline

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.
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
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.
Create new calculated value with value of 100
Make sure calculataed field is on top of the values
Put calculated value on Secondary Axis
Change Chart Type to Bar Chart
Adjust the size to your needs. The example below: PointWidth = 0.01
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: