Hello,
I am using C# and Asp.NET in the issue described below.
I have a Website which I access to using the following Url: http://localhost:8349.
This Website has the following folder at its root level: Reporting
Reporting folder hosts another folder: Reports
Finally, Reports also hosts a folder: Styles
The Styles folder contains one file called Style.xml. This file is a Stylesheet that I got by exporting the Style set on a previously existing report. Its build action is set to Content and its Copy to Output Directory is set to Do not copy.
Inside the Reports folder, I have a Telerik report called Report1.cs. It has a single textbox with its StyleName property set to a value from within the Style.xml. The report itself has one External StyleSheet that corresponds to the file in the Styles folder. The Kind is set to Relative.
At the root level of my Website I have an aspx page called MyReport.aspx. It contains a single report viewer. In the Page_Load method of the page, I have the following code:
Report1 report = new Report1(); ReportManagementViewer.Report = report;this.ExternalStyleSheets.Add(new Telerik.Reporting.Drawing.ExternalStyleSheet("Reporting\\Reports\\Styles\\Style.xml"));this.ExternalStyleSheets.Add(new Telerik.Reporting.Drawing.ExternalStyleSheet("..\\Reporting\\Reports\\Styles\\Style.xml"));if (!DesignMode) { this.ExternalStyleSheets.Add(new Telerik.Reporting.Drawing.ExternalStyleSheet("..\\Reporting\\Reports\\Styles\\Style.xml")); } else{ this.ExternalStyleSheets.Add(new Telerik.Reporting.Drawing.ExternalStyleSheet("Reporting\\Reports\\Styles\\Style.xml")); }// Get the chart from the subreport var individualContributionsReportChart = (Telerik.Reporting.Chart)individualContributionsReport.ReportSource.Report.Items["labelsGroupHeader"].Items["chart1"];protected void Page_Load(object sender, EventArgs e){ if (IsPostBack) { TotalContributionsOverviewReport report = new TotalContributionsOverviewReport(); var individualContributionsReport = ((Telerik.Reporting.SubReport)(report.Items["reportFooter"].Items["IndividualContributionsSubReport"])); GetIndividualContributionsChart(individualContributionsReport, startDate, endDate, categoryNameFilter, categoryIdFilter); ReportViewer1.Report = report; }}private void GetIndividualContributionsChart(Telerik.Reporting.SubReport individualContributionsReport, DateTime startDate, DateTime endDate, string categoryNameFilter, string categoryIdFilter){ // Get the chart from the subreport var individualContributionsReportChart = (Telerik.Reporting.Chart)individualContributionsReport.ReportSource.Report.Items["labelsGroupHeader"].Items["chart1"]; // Get the chart data var records = PersistenceFactory.GetRecords(); var categoryGroups = records.GroupBy(r => r.CategoryName); foreach (var g in categoryGroups) { // Create a ChartSeries and assign its name and chart type ChartSeries chartSeries = new ChartSeries(); chartSeries.Name = g.Key; chartSeries.Type = ChartSeriesType.Line; // add new items to the series, // passing a value and a label string foreach (var c in g) { ChartSeriesItem item = new ChartSeriesItem() { XValue = c.ContributionDate.ToOADate(), YValue = Convert.ToDouble(c.Amount) }; chartSeries.Items.Insert(chartSeries.Items.Count, item); } // add the series to the Chart Series collection individualContributionsReportChart.Series.Add(chartSeries); // format the chart axis FormatChartAxis(individualContributionsReportChart, startDate, endDate, step); }}defChart.PlotArea.XAxis.DataLabelsColumn = "DoubleDateTime";
defChart.PlotArea.XAxis.IsZeroBased = false;defChart.PlotArea.XAxis.AutoScale = true;defChart.PlotArea.XAxis.Appearance.ValueFormat = ChartValueFormat.LongDate;defChart.PlotArea.XAxis.Appearance.CustomFormat = "dd HH:mm";defChart.PlotArea.XAxis.LayoutMode = ChartAxisLayoutMode.Inside;Date Value2012-07-11 09:40 222012-07-11 09:41 152012-07-11 09:43 162012-07-11 09:43 172012-07-11 09:44 16I followed the wizzard and made no changes to the report layout besides what the wizzard did and when I export to Excel there are two extra blank rows between every row of data. What is causing this?
The report has a labels group header and detail...
How to avoid blank rows? Its urgent.
Thank you
Jayanthi