how to display data point names outside of pie chart in ssrs 2008? - reporting-services

I created Pie report in SSRS 2008 R2.
My Problem is want to display data in outside
Can anyone give me the steps How to display Names in outside of report

Go to the Chart Series Properties by either clicking on the chart labels or the data field in the Designer.
Change Label -> Position from Auto:
to Outside:
Chart with Auto position:
Chart with Outside position:
Obviously you'll need to work with the chart/label size to get the Chart looking OK, but hopefully this gets you on the right path.
Edit after comment:
You can set the labels as required under Series Label Properties -> General -> Label data:
Set it to something like:
=Fields!YourField.Value & " " & CStr(Count(Fields!YourField.Value))
as required. Obviously you haven't supplied any details of your DataSet so you'll need to update to suit your requirements.

Related

report server (ssrs): how to handle long names on vertical axis

I have a chart built in Report Builder (MS Reporting Services), where vertical axe is categorical.
Label names of categorical axe is very long.
Is it possible to shrink the length of names for first 10 symbols and show full names when mouse coursor is over the names?
I don't think this is possible natively in SSRS but you might be able to get an acceptable compromise.
First click on the chart, so the config pane opens, click on your category group and then edit the label property to something like this
=LEFT(Fields!Caption.Value, 10)
(Caption is the name of the field containing the label that appears on the Y axis in my case)
Now that you have the shortened name showing you need to show the full name somewhere. Unfortunately, the group labels do not support tooltips but chart series do.
Click anywhere on the bar (but not on the data label) and then set the tooltip property to something like
=Fields!Caption.Value & " " & Fields!Amount.Value
When we run the report and hover the mouse over the 3rd green bar, we get the following...

Hide Duplicate Legend Items in SSRS Report Chart

I have a stacked column chart in SSRS that displays data by hour. Included in this data is the meters reading, kVa, Average Temperature and Heat Index for that hour. For some reason, the legend items for the temperature values and the kVa are being repeated for each meter in the dataset. I would like for my legend to have the following values: kVa, Average, Heat Index and each meter number. I included a sample of the chart, the chart data configuration as well as some sample data below. Any idea how I can accomplish this? Please let me know if any other information is required.
Here is a good solution which covers all possible scenarios
go to "Report Properties" (right click in the blank area)
go to variables and add a new variable called myflag, set the value to "true" and deselect Read-Only
go to the "Series Properties" and then to "Legend" and click the expression button next to "Do not show this series in legend"
Type or paste this code:
=IIF( Variables!myflag.Value = true, false, true )
=Variables!myflag.SetValue( false )
and that's it.
hint
You can use the same variable in the same series' visibility expression without the setting part in the second line to avoid overlapping the drawing of the same series on the chart
I couldn't get either of these answers to work for me. Ended up using RowNumber and CountRows in the expression for Do not show this series in a legend property.
=IIF(RowNumber("Dataset")=CountRows(),false,true)
You're getting one set of legend values per series you've added. For each series besides the one whose legend you want to keep visible, right click the series (each top-level row in the "Values" box), choose Series Properties, go to the Legend tab, and check "Do not show this series in a Legend."
I was able to fix my issue using information from this question on stack overflow: https://stackoverflow.com/a/1867343/965213
Go to the Legend page of the series properties you want to include in the chart.
Edit the function for the "Do not show this series in a legend" property.
Use this formula: =IIF(Fields!SerialNumber.Value=Last(Fields!SerialNumber.Value,"MeterDetail"),false,true)
Now the series will only be repeated once instead of once per series group.
Hope this helps!

Report Builder 3.0, breaking out data field for Bar Chart

I'm using Report Builder 3.0 and trying to figure out if i can break out one datafield with the few values I need for my bar chart. The data looks like this;
[[44278,47411],[{"name":"$41,000/year goal","y":41000}],["",""]]
I want bar 1 to be the 44,278 value, bar 2 to be the 47,411 value and the 41000 to be embedded as a goal. I've attached a screenshot of how we have it working with other grid and charting products, but this is going to be embedded in a much more in-depth SSRS report. Any sort of help would be great as i'm new to the whole SSRS reporting system.
You can do this with a custom StripLine:
Right-click the vertical chart axis and click Vertical Axis Properties.
The axis properties are displayed in the Properties window.
In the Appearance section of the Properties pane, for the StripLines property, click the Edit Collection (…) button to open the ChartStripLine Collection Editor.
Click Add to add a new strip line to the collection.
Click StripWidth to specify the width of the strip line. If your goals will fluctuate, you might want to make it relative to your Goal e.g. =Fields!YourGoalField.Value/100
Set the StripWidthType property to Number.
Set the InvervalOffset value to =Fields!YourGoalField.Value.
Set the IntervalOffsetType value to Number.
More on StripeLines: http://technet.microsoft.com/en-us/library/dd239316.aspx
EDIT To get the Goal Label outside the Chart Area as depicted, we have to do a sort of hack:
Delete the StripLine Title as there is no way to get that outside the Chart Area.
Right Click the Chart and select Add New Title.
On your new Chart Title's Properties Pane
Set the Docking Position to Right Center.
Set the TextOrientation to Horizontal.
Adjust the Font style and color to match your spec.
Set the Caption Expression to =Format(Fields!YourGoal.Value,"$0,000") & "/year goal"
Here is where the hack comes in. In order to get the Goal label to line up with the Goal Line, you need to add a certain number of carriage return/line feeds to your Caption Expression. To do this, append & vbcrlf to the Caption Expression a bunch of times and keep testing until it lines up. You might also want to adjust the DockingOffset property to move the Label closer to the Chart Area.

How can we display percentage in pie chart SSRS

I have a Pie Chart in SSRS which has 4 Sectors with some number on them,i was planning to display percentages rather than displaying numbers.I tried Clicking on the Series Label properties and set the Label Data as #Percent.but percentage is displaying for only one sector and numbers to other sectors.
How can i display percentages for all the sectors?
By default, the Series Label will return the Value for the Series. You can set it to format as a Percentage, but if the Value is 1, it is going to display 100%. To get the percentage Value over the Total Value, you'll need to modify the Label Data formula under the Series Label Properties.
Right Click the Series Label on your Chart.
Select Series Label Properties.
Enter this formula into the Label Data box, replacing your actual field and dataset names:
=sum(Fields.YourValue.Value)/sum(Fields.YourValue.Value,"YourDataSet")
Make sure you have selected "Percentage" under the Number Category on the Series Label Properties.
Let me know if you need more detail.
You need to set the UseValueAsLabel property of EACH DATA SERIES to false, and set the Label property to #PERCENT for EACH DATA SERIES. The problem arises when using Visual Studio to edit the report, if you right click and choose "Show Data Labels" it only sets the first data series. You need to right click on the chart and bring up the box with all the data series listed, and then click on each one and choose "Show Data Labels", and then change the properties in the property panel for that data series.
SQL Server 2012 Reporting Services, Visual Studio 2010.
It should be: right click on the chart, select "Show data labels".
Then right click on the label, Series label properties, select "#PERCENT" on the Label data drop down.

How to place a legend right next to the data set (series) on SQL Reporting Services 2008 (SSRS) line chart?

I believe that placing legend at the end of line series is user friendlier rather than placing legend in the table. I do not think SSRS is able to do that...
I could put the series names manually; however, I wish them to be dynamic.
Please advise if you know how to put legend next to the series line as in example below:
Click on the values for the chart data
In the properties toolbar go to Labels - Label -Label
Put the text you want for the label
Click the drop down on visible (it is several fields below label)
Click expression
Put in the logic to only show it if it is the rightmost part on the x axis. For example, if the X axis is a date field make it only show for the max date.
=IIF(Fields!CreatedOn.Value = MAX(Fields!CreatedOn.Value, "DataSet1"), TRUE, FALSE)
Here is what I end up with: