Legend Display Setting in SSRS 2008
In SSRS 2008 when you have only one series , it displays the name of series in legend series 1. But when you have more than one series group it displays with the true series name in legend box. However, in SSRS 2005 for the same report ,legend box displays
the true series name whether I have one or many series groups. Is there any way to control how legend displays the selected series name insteady of "series 1" in SSRS 2008? What I want to do is replacing "series 1" with "Quarter1" in legend box in SSRS
2008.
Below is how legend displays series group in SSRS 2005 and SSRS 2008 respectively,
Quarter 1
Quarter 2
SSRS 2005
Quarter1
Quarter2
SSRS 2008
Quarter1
SSRS 2005
Series 1
SSRS 2008
Thanks in advance for any taughts and advice!
mercyme
SSRS 2005
SSRS 2008
November 8th, 2010 6:09pm
well i tried same thing as you told
I took Year and Month and both are grouped properly, i am not getting any series 1 ..etc.
as far as i know Series1,series2 only comes when you data is NULL for that particuler cell.
Please check if you have any NULL or blanks are coming in you data.
Gaurav Gupta http://sqlservermsbiblog.blogspot.com/
Free Windows Admin Tool Kit Click here and download it now
November 8th, 2010 9:05pm
Hi Gaurav,
I do not have any null or blanks for series values. I am wondering, it displays the name of series group when you have more than one series in the legend. However, it replaces with series name with "series 1" whenever I have only one series group. The report
is on SSRS 2008. Is it a bug or some thing that I can fix by resetting property of charts and legend?
Thanks for your suggestion,mercyme
November 8th, 2010 9:49pm
Hi,
Based on your description, I have tried to reproduce the scenario you posted, my steps are below:
1.
Add a dataset with 2 field Amount and Quarter.
2.
Add a Column Chart.
3.
Drag the Amount field and drop it in the top data area of the Chart.
4.
Drag the Quarter field and drop it in the right series area of the Chart.
However, even the Quarter field in the dataset only include the same value “Quarter1”, the legend will still display ’Quarter1’ in preview.
So, please check the following items in your report:
1.
Select the field in the series group area and ensure the
Label property is specified to the correct field name which you selected.
2.
Select the field in the top data area, and ensure the
Text of Legend property is empty.
If both properties are correct, please check and post the specific version of your Reporting Services 2008, it can be found at the bottom of the Report Server home page.
If I have something misunderstood, please let me know.
Thanks,
Tony ChainPlease remember to mark the replies as answers if they help and unmark them if they provide no help
Free Windows Admin Tool Kit Click here and download it now
November 10th, 2010 10:40am
Hi Tony,
Thank you for taking time on working in this scenario. Actually this report is deployed in web application (ASP.NET) or Report Viewer and we have parameters to select for different selection criteria. This is one case. The number of series group that
appears dynamicallly determined on parameter selection criteria. In this case, for example , if you have a region that contain ten states or a year that contain three Quarter. When I select a parameter that includes more than one states or Quarters, I do not
have any problem it displays the name in legend (AZ,CA,DC,OR... Quarter1, Quarter2, Quarter3). But when I select parameter that includes only one series (i.e. only one state or only one Quarter), it doesn't show me with the state or quarter name insteady it
shows "Series1".
And I have checked labe property is specified to the correct name and Text Legend is Empty.
My Reporting Service Version is:-
Microsoft SQL Server Reporting Services Designers
Version 10.0.1600.22
** For the same scenario in SSRS 2005 , I do not have this problem.
Thanks Again!
mercyme
November 10th, 2010 7:01pm
Hi,
Thank you for detailed information. However, based on my testing on the Reporting Services Version 10.0.1600.22, I still cannot reproduce the scenario you posted. So, if possible,
could you please send your report file and the dataset with sample data to the E-mail address below?
Then I will try to find the root cause.
E-mail: sqltnsp AT microsoft.com
(Please replace the AT with @, and remove additional spaces)
Thanks,
Tony ChainPlease remember to mark the replies as answers if they help and unmark them if they provide no help
Free Windows Admin Tool Kit Click here and download it now
November 17th, 2010 5:09am
Hi,
I have received the E-mail. Based on the information in it, I have tried to reproduce the scenario by the following steps.
1.
I added report RegionRateGraph.rdl to a Report Server Project in BIDS.
2.
In order to run the report, I changed the data fields which bound to Chart to the field available in my dataset while keeping the structure of the chart. Also changed the parameters but still
use a multi-value parameter to filter the Series Group in the query level.
3.
Deploy the report to the Report Server. Then I could check the report in Report Manager and the legend displays correct for both single series group and multiple series group.
4.
I created an ASP.NET web site and added a ReportViewer control to a web page.
5.
The ReportViewer was configured in
Remote mode and point to the RegionRateGraph report in the ReportServer.
6.
Set the
ShowParameterPrompts property to False. Then use code to the pass parameter to the report like:
List<ReportParameter> paramList =
new List<ReportParameter>();
paramList.Add(new
ReportParameter("State",
new string[]{"StateName"}));
this.ReportViewer1.ServerReport.SetParameters(paramList);
this.ReportViewer1.ServerReport.Refresh();
However, even though only one parameter value is passed to the report, the legend still displays the correct name of the series group. So, if some steps above are inconsistent with
the way you achieved, please point out.
Thanks,
Tony ChainPlease remember to mark the replies as answers if they help and unmark them if they provide no help
November 22nd, 2010 9:24am
Sorry for delay response! I have followed your steps but still have problem with my report legend!
Thanks!
mercyme
Free Windows Admin Tool Kit Click here and download it now
November 29th, 2010 7:21pm
Hi,
note the legend text for series can be configured.
In Report designer,
select the series go to Series Properties go to Legend Custom Legend Text is what you are looking for
Programmatically, the ChartSeries class have a property called
ChartItemInLegend, which may allow you to achieve the same result. (I did not test it, though.)
November 23rd, 2011 8:26am