StripLines with same properties displaying different width - reporting-services

I have two different horizontal stripLines in my bar graph. I am displaying a label for these stripLines through the use of a line chart data type with the corresponding values. My problem is I have the same properties (other than actual value) for these stripLines, but they are displaying at 2 different widths. Does the stripInterval have anything to do with this?
The interval and interval offset for the top line (1200/yr) is;
=Fields!BasicNeed.Value + Fields!LifeStyleNeed.Value
=Fields!BasicNeed.Value + Fields!LifeStyleNeed.Value + 1 (not sure what offset should really be but this displays great)
and for the bottom line which is appearing too thin;
=Fields!BasicNeed.Value
=Fields!BasicNeed.Value + 1
The BorderWidth, BorderStyle, BorderColor, StripWidth, IntervalTypes and everything else are all the exact same except for the actual values above.

I just had this same issue.
The problem for me was that I was using the StripWidth property to control the width of the strip (what was I thinking?). That should be set to 0 - it's actually a proportion based on the total axis value.
Use the BorderWidth property to control the width of the Strip Line.
Also, make sure you set the BorderStyle to Solid. Default looks like Solid but is actually None.
Source: Mark from Dundas

I would set the Interval property back to Auto. You only need to set the IntervalOffset property.

Related

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

Barchart is empty when there is no value

I am using html5 stacked bar charts in JasperSoft Studio.
When there is no value to be displayed, the chart is totally empty and the 0 (zero) line in the y axis goes to the upper. It doesnt really stay at the level of origin.
How can I get the bars of the chart even if there is no corresponding data to be displayed. like a thin line on the level of zero?
And how can I take the 0 line back on the x axis?
You can set "Range Axis Min Value Expression" to 0 in the stacked bar-chart properties section.
To add open property panel click on the chart and select Windows --> Properties then add
Range Axis Min Value Expression = 0
I faced a similar problem where the bar was not showing up correctly. So what I did was I set the max and the min value in the customizer class
In my case the range of the bar was from 0 to 1.
NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
rangeAxis.setLowerMargin(0.0);
rangeAxis.setUpperMargin(1.0);
rangeAxis.setRange(0, 1.0);
setting maxto a value is a solution but it has a side-effect for me. It fixes the scale of the axis so if the max value is very big compared to the current data we have, the resulting graph doesnt look nice.
I set minRange to 0.1 and it solved my problem. I didnt need to set max after that.

Chart bar not property sizing when scalar axis's interval set to 1

When I create a Microsoft SQL Server Reporting Services 2012 bar chart with the horizontal axis type set to scalar and the interval set to 1, the rendered bar size does not match the axis label size.
In the example below, a value of 1 should be displayed for 9/1/12 and a value of 52 should be displayed for 9/5/12. However, the bars span too wide. Each spans three date labels instead of just one.
How do I limit the chart's bars so that they are the proper width?
Thank you!
I had the same problem, I changed the MaxPixelPointWidth to a value, in my case 15, and that fixed my problem.
(Chart Series properties=>CustomAttributes=>MaxPixelPointWidth) //Mari

Implementing Target lines, in SSRS column Charts

I have a column graph, that shows a trend of consumption over time,
The y-axis being consumption and x-axis being time in month,
I have to implement a target consumption.
I implemented a target, by adding data field with a Line chart type, this is a constant, and will just display a horizontal line.
The problem i am facing is, if there is only one month, the line disappears? is there a way not to have it disappear, or is there a better way to add line target in column charts in SSRS
I am using SSRS 2008
Adding a StripLine may do what you want. They are a little hard to find, but here is how:
1) Make sure that the properties window is open beforehand. If it isn't, either hit F4 or go to the View Menu -> Properties Window.
2) Left click on your vertical axis to select it.
3) Select the StripLines entry in the Properties Window and click the ellipsis:
4) Click Add
5) Starting off, the stripline is invisible, so it can be a bit hard to adjust. :). To make it visible as a thin line, set BorderStyle to "Solid". Adjust the color with BorderColor and width with BorderWidth (not StripWidth). While positioning the line, I like to set the color to something obnoxious and make it wide to make it easier to spot.
5) To position it, you want to set the IntervalOffsetType to match the type of your interval you have set on the vertical axis. Then IntervalOffset to the y-value of where you want your target line to appear. Since you only want 1 line to appear and not repeat, you must keep Interval set to auto.
6) Once you get it positioned, make final adjustments to the appearance.
I had a hard time finding it for my Databar. I stumbled onto this...
Make sure Properties toolbar is visible
Click the Databar to highlight
Find ChartAreas in properties toolbar, click to open ChartAreas dialog
Find ValueAxes in ChartAreas dialog, click to open ChartAxis dialog
Find StripLines in ChartAxis dialog, click to open ChartStripLine dialog
I was playing around a little earlier, and i noticed that i can change the interval for the major and minor gridlines, AND change the format for the lines. I had the bright idea of making the minor lines look like the major ones i had and format the major lines to look like a target line. I don't know if this'll work for you buy you could try it.

SSRS - Setting Table Row Height

I'm working in a SSRS report. I have a table in the report. How do I set the row height of the rows in the table?
Select the row you want to change the height of. With that row selected bring up the properties pane (Alt+enter if you don't see it). Scroll down to the position group of properties and specify the width and height there. The "cangrow" and "canshrink" properties are useful too sometimes.
Hope that helps!
Select one cell in a row , go to properties, go to size, give width and height and dis-select "allow textbox height to increase" and "allow textbox height to decrease" in textbox properties. Then it will effect on whole row.
You can edit the RDL(C) and set it exactly using an XML editor.
Look for the following:
...
<TablixRows>
<TablixRow>
<Height>1.5in</Height>
...
Note that you must have set the row height before there will be a Height node.
Since a tablix row doesn't have a dynamic height property (only CanGrow and CanShrink properties), I came up with a workaround.
You can use the length function LEN() in the Value expression for a cell in the row you want more height and add whitespace to the bottom (or top) of the cell with <br/> tags, thus effectively changing the row height dynamically.
To do this, first in the Placeholder Properties of the cell, change the markup type to "HTML - Interpret HTML tags as styles". (Just like changing the static row height property for a cell, this will change the height for the entire row.)
The "dynamic" whitespace you add to the bottom (or top) of the cell depends on how many <br/> tags you append to the value. Here's an example to add whitespace to the row if the cell has a value length of 100 or more characters (increasing the whitespace for every additional 100 characters in length).
=IIF(LEN(Fields!myText.Value) < 100, Fields!myText.Value,
IIF(LEN(Fields!myText.Value) < 200, Fields!myText.Value + "<br/><br/>",
IIF(LEN(Fields!myText.Value) < 300, Fields!myText.Value + "<br/><br/><br/><br/>",
Fields!myText.Value + "<br/><br/><br/><br/><br/><br/>"))))))
Make sure the CanGrow and CanShrink properties are set according to your needs. (For the example above, CanGrow is set to True.
From the Microsoft documentation Change Row Height or Column Width (Report Builder and SSRS):
In Design view, click a cell in the table row.
In the Properties pane that displays, modify the Height property, and then click anywhere outside the Properties pane.
Changing the height of one cell appears to affect the whole row. It worked for me.