or
I have a report with 4 visible parameters and only one has AutoRefresh on. We have recently upgraded this report to Q3 2012 version. I was able to refresh the report when the AutoRefresh parameter value is changed with the previous releases. But after I upgraded the report to Q3 2012, this feature is not working. I do need the Preview button for other parameters.
Please let me know how can I refresh the page when this parameter is changed without having to click the Preview button.
Thank you
public class GraphItem{ public string name { get; set; } public double value { get; set; } public GraphItem(string name, double value) { this.name = name; this.value = value; }}private void chart1_NeedDataSource(object sender, EventArgs e){ //Prepare graph value List<GraphItem> graphItemList = getQueryResult(sqlDataSource1); //Plot Graph Telerik.Reporting.Processing.Chart procChart = (Telerik.Reporting.Processing.Chart)sender; Telerik.Reporting.Chart defChart = (Telerik.Reporting.Chart)procChart.ItemDefinition; defChart.IntelligentLabelsEnabled = false; ChartSeries serie = new ChartSeries(); serie.Type = ChartSeriesType.Pie; serie.Clear(); serie.Appearance.LegendDisplayMode = Telerik.Reporting.Charting.ChartSeriesLegendDisplayMode.ItemLabels; foreach (GraphItem lst in graphItemList) { ChartSeriesItem item = new ChartSeriesItem(); item.YValue = (double)lst.value; item.Name = (string)lst.name; item.Appearance.Exploded = true; item.Label.TextBlock.Text = (string)lst.name + " - #%"; serie.Items.Add(item); } defChart.Series.Clear(); defChart.Series.Add(serie);}| private void chart1_NeedDataSource(object sender, EventArgs e) |
| { |
| List<Product> produtos = new List<Product>(); |
| produtos.Add(new Product() { qty = 10, name = "Produto 1" }); |
| produtos.Add(new Product() { qty = 35, name = "Produto 2" }); |
| produtos.Add(new Product() { qty = 17, name = "Produto 3" }); |
| produtos.Add(new Product() { qty = 65, name = "Produto 4" }); |
| ChartSeries serie = new ChartSeries(); |
| foreach (Product prod in produtos) |
| { |
| ChartSeriesItem item = new ChartSeriesItem(); |
| item.YValue = prod.qty; |
| item.Name = prod.name; |
| item.Label.TextBlock.Text = prod.name; |
| serie.Items.Add(item); |
| } |
| chart1.Series.Add(serie); |
| } |
| private void chart1_NeedDataSource(object sender, EventArgs e) |
| { |
| List<Product> produtos = new List<Product>(); |
| produtos.Add(new Product() { qty = 10, name = "Produto 1" }); |
| produtos.Add(new Product() { qty = 35, name = "Produto 2" }); |
| produtos.Add(new Product() { qty = 17, name = "Produto 3" }); |
| produtos.Add(new Product() { qty = 65, name = "Produto 4" }); |
| chart1.DataSource = produtos; |
| } |
ChartSeries
series = chart1.Series[0];
| private void chart1_ItemDataBound(object sender, EventArgs e) |
| { |
| ChartSeries series = chart1.Series[0]; |
| series.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.ItemLabels; |
| series.Type = ChartSeriesType.Pie; |
| } |
| private void Form1_Load(object sender, EventArgs e) |
| { |
| reportViewer1.Report = new ReportTest(); |
| reportViewer1.RefreshReport(); |
| } |
| using System; |
| using System.ComponentModel; |
| using System.Drawing; |
| using System.Windows.Forms; |
| using Telerik.Reporting; |
| using Telerik.Reporting.Drawing; |
| using System.Collections.Generic; |
| using Telerik.Reporting.Charting; |
| public partial class ReportTest : Telerik.Reporting.Report |
| { |
| public ReportTest() |
| { |
| InitializeComponent(); |
| } |
| private void chart1_NeedDataSource(object sender, EventArgs e) |
| { |
| List<Product> produtos = new List<Product>(); |
| produtos.Add(new Product() { qty = 10, name = "Produto 1" }); |
| produtos.Add(new Product() { qty = 35, name = "Produto 2" }); |
| produtos.Add(new Product() { qty = 17, name = "Produto 3" }); |
| produtos.Add(new Product() { qty = 65, name = "Produto 4" }); |
| chart1.DataSource = produtos; |
| ChartSeries series = chart1.Series[0]; |
| } |
| private void chart1_ItemDataBound(object sender, EventArgs e) |
| { |
| ChartSeries series = chart1.Series[0]; |
| series.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.ItemLabels; |
| series.Type = ChartSeriesType.Pie; |
| foreach (ChartSeriesItem item in series.Items) |
| { |
| double x = item.YValue; |
| item.Label.TextBlock.Text = "BLAH"; |
| item.Appearance.Exploded = true; |
| } |
| series.SetValues(new double[] {10,15,30,47 }); |
| chart1.PlotArea.SetDirty(); |
| } |
| } |
| public partial class Form1 : Form |
| { |
| public Form1() |
| { |
| InitializeComponent(); |
| } |
| private void Form1_Load(object sender, EventArgs e) |
| { |
| reportViewer1.Report = new ReportTest(); |
| reportViewer1.RefreshReport(); |
| } |
| } |
| J. Aaron Grantham, MD<br/>Consulting <li>Abbott Vascular</li>Grant Support <li>Abbott Vascular</li><li>Medtronic, Inc.</li><li>Asahi Intecc Co.</li>Honoraria <li>Boston Scientific Corporation</li><li>Bridgepoint</li><br/><br/>Off Label: No FDA aproved stent for CTO-PCI. Will not reccomend one in particular.<br/><br/> |