ASP.NET - rdl reports - Asked By Anandh Ramanujam on 19-Dec-11 08:07 AM


Im working on rdl reports (SSRS). Im very new to this.

I have created a pie chart. I want the labels has to be display both values and percentage. How we can do this.

Jitendra Faye replied to Anandh Ramanujam on 19-Dec-11 08:10 AM
When you select Crystal Report, give a meaningful name to the report. Here, I have given “ChartSample1.rpt”. Then click Add button.

Once you click the Add button, you will get a window as shown by the following figure.

 Select ‘Using the Report Wizard’ option and keep the ‘Standard’ report format and click OK
button. Then you need to create the database connection to access tables within the database.

follow this link for complete steps-
Riley K replied to Anandh Ramanujam on 19-Dec-11 08:12 AM

Right click on the labels of the chart, In the general tab choose #PERCENT for the label data

Anandh Ramanujam replied to Riley K on 19-Dec-11 08:21 AM
Yes, but i want to display both values and percentage
Suchit shah replied to Anandh Ramanujam on 19-Dec-11 08:37 AM
To display percentage values as labels on a pie chart
  1. Add a pie chart to your report. For more information, see

  2. On the design surface, right-click on the pie and select Show Data Labels. The data labels should appear within each slice on the pie chart.

  3. On the design surface, right-click on the labels and select Series Label Properties. The Series Label Properties dialog box appears.

  4. Type #PERCENT for the Label data option.

  5. (Optional) To specify how many decimal places the label shows, type "#PERCENT{Pn}" where n is the number of decimal places to display. For example, to display no decimal places, type "#PERCENT{P0}".

To display percentage values in the legend of a pie chart

  1. On the design surface, right-click on the pie chart and select Series Properties. The Series Properties dialog box displays.

  2. In Legend, type #PERCENT for the Custom legend text property.

Anandh Ramanujam replied to Suchit shah on 19-Dec-11 08:53 AM
while doing so, i got only percentage. But i want both original values and percentage (for ex. 1726, 27%)
kalpana aparnathi replied to Anandh Ramanujam on 19-Dec-11 01:57 PM

To fetch the report on your web page, you will need to drop a Report Viewer control on the page.


<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
  Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<rsweb:ReportViewer runat="server" ID="MyReportViewer" Width="100%" Height="700px">


You will need to write below code in your code behind.


MyReportViewer.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
MyReportViewer.ServerReport.ReportServerCredentials = new ReportServerNetworkCredentials();
MyReportViewer.ServerReport.ReportServerUrl = new Uri(@"http://myreportserver/reports");
MyReportViewer.ServerReport.ReportPath = "InvoiceReport";
MyReportViewer.ShowParameterPrompts = false;
MyReportViewer.ShowPrintButton = true;
Microsoft.Reporting.WebForms.ReportParameter[] reportParameterCollection = new Microsoft.Reporting.WebForms.ReportParameter[1];
reportParameterCollection[0] = new Microsoft.Reporting.WebForms.ReportParameter();
reportParameterCollection[0].Name = "INVOICEID";