namespace
Reports
{
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using Telerik.Reporting;
using Telerik.Reporting.Drawing;
using Telerik.Reporting.Charting;
/// <summary>
/// Summary description for DeliveryStatus___Client.
/// </summary>
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_NeedDataSource(object sender, System.EventArgs e)
{
Telerik.Reporting.Processing.
Chart chart = sender as Telerik.Reporting.Processing.Chart;
chart.Series.Clear();
ChartSeries s = new ChartSeries();
s.Type =
ChartSeriesType.Pie;
s.Appearance.LegendDisplayMode =
ChartSeriesLegendDisplayMode.ItemLabels;
chart.Series.Add(s);
}
}
}
Hello, Im new to coding in general and am trying to label the columns in a chart. I have the chart displaying the data i want, but all the labels are 1,2,3, etc. for each column. I tried using the code below but without much coding experience im not sure how to use it. I think i need something before it to make it work but im not sure. Im also not sure where in the code this should go, does it go in the general .cs file for Telerik Reporting Item or does it go in the "details" section where the chart is located? if i can provide any more info please ask.
Chart.PlotArea.XAxis.AutoScale = false; Chart.PlotArea.XAxis.AddRange(1, 7, 1); Chart.PlotArea.XAxis[0].TextBlock.Text = "Mon"; Chart.PlotArea.XAxis[1].TextBlock.Text = "Tue"; Chart.PlotArea.XAxis[2].TextBlock.Text = "Wed"; Chart.PlotArea.XAxis[3].TextBlock.Text = "Thu"; Chart.PlotArea.XAxis[4].TextBlock.Text = "Fri"; Chart.PlotArea.XAxis[5].TextBlock.Text = "Sat"; Chart.PlotArea.XAxis[6].TextBlock.Text = "Sun";
<system.web> <compilation debug="true" targetFramework="4.0"> <assemblies> <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /> <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> <add assembly="System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add assembly="Telerik.ReportViewer.WebForms, Version=6.0.12.215, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" /> <add assembly="Telerik.Reporting, Version=6.0.12.215, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" /> </assemblies> </compilation>...<pages> <controls> <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" /> <add tagPrefix="tlkReporting" namespace="Telerik.ReportViewer.WebForms" assembly="Telerik.ReportViewer.WebForms"/> </controls><tlkReporting:ReportViewer ID="ReportViewer1" runat="server" Height="500px" Width="100%" Visible="False" />
When publishing to the live server the telerik reports do not have Excel and PDF exporting options available in the web report viewer. Works fine on testing server.
I am using the latest demo version.
How can this be fixed?