Note that there are some explanatory texts on larger screens.

plurals
  1. PORenaming a Telerik reporting legend item
    primarykey
    data
    text
    <p>Im working in Visual Studio with Telerik Reporting 2010. Im trying to rename the labels for the legend in a pie chart. I think my problem is in the code but my knowledge is limited so i dont see whats wrong. Can anyone help me find whats wrong? The errors i am getting are at the bottom.</p> <pre><code>namespace Reports { using System; using System.ComponentModel; using System.Drawing; using System.Windows.Forms; using Telerik.Reporting; using Telerik.Reporting.Drawing; /// &lt;summary&gt; /// Summary description for DeliveryStatus___Client. /// &lt;/summary&gt; public partial class DeliveryStatus___Client : Telerik.Reporting.Report { public DeliveryStatus___Client() { // // Required for telerik Reporting designer support // InitializeComponent();} // // TODO: Add any constructor code after InitializeComponent call // private void chart1_ItemDataBinding(object sender, EventArgs e) { var procChart = ((Telerik.Reporting.Processing.Chart)sender); Telerik.Reporting.Charting.LabelItem labelItem1 = new Telerik.Reporting.Charting.LabelItem(); Telerik.Reporting.Charting.LabelItem labelItem2 = new Telerik.Reporting.Charting.LabelItem(); labelItem1.Marker.Visible = true; labelItem1.Name = "LegendItem1"; labelItem1.TextBlock.Text = procChart.Report.Parameters["Due Beyond"].Value.ToString; labelItem2.Marker.Visible = true; labelItem2.Name = "LegendItem2"; labelItem2.TextBlock.Text = procChart.Report.Parameters["Due Monday"].Value.ToString; this.chart1.Legend.Items.AddRange(new Telerik.Reporting.Charting.LabelItem[] { labelItem1, labelItem2}); this.chart1.Legend.Items.AddRange(new Telerik.Reporting.Charting.LabelItem[] {labelItem1,}); } Error 2 Cannot implicitly convert type 'object' to 'string'. An explicit conversion exists (are you missing a cast?) C:\Users\wondergoat77\Documents\VS - Projects\Reports\Reports\DeliveryStatus - Client.cs 34 45 Error 3 Type or namespace definition, or end-of-file expected C:\Users\wondergoat77\Documents\VS - Projects\\Reports\DeliveryStatus - Client.cs 52 1 Error 4 Cannot convert method group 'ToString' to non-delegate type 'string'. Did you intend to invoke the method? C:\Users\wondergoat77\Documents\VS - Projects\Reports\Reports\DeliveryStatus - Client.cs 34 45 Error 5 Cannot convert method group 'ToString' to non-delegate type 'string'. Did you intend to invoke the method? C:\Users\wondergoat77\Documents\VS - Projects\Reports\Reports\DeliveryStatus - Client.cs 37 45 } } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload