This is a migrated thread and some comments may be shown as answers.

A work around for drill-down report charts

2 Answers 164 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dhanushka Athukorala
Top achievements
Rank 2
Dhanushka Athukorala asked on 18 Nov 2009, 12:40 PM
I need to have some drill-down reports in my web site and i got to know about the telerik report limitations regarding that matter recently
before finding that i tried to work around it using active regions but was stone walled after some tries
I have attached a sample demo code of my failed test with this and I would like to hear from any one who have successfully achieved the task. If anyone get any ideas of a work around after reading this post please be kind enough to share it with everyone
Thank you

        private void chart1_NeedDataSource(object sender, System.EventArgs e) 
        {             
            string connectionString = "Data Source=sab-srv-mds001; Database=datahub1; User ID=sa;Password=abc@123"
            string command = "select RangeMax from AmountRange"
            SqlDataAdapter adapter = new SqlDataAdapter(command, connectionString); 
            DataSet dataSet = new DataSet(); 
            adapter.Fill(dataSet); 
            ArrayList itemSet = new ArrayList(); 
            foreach (DataRow row in dataSet.Tables[0].Rows) 
                itemSet.Add(row[0]); 
            ChartSeries series01 = new ChartSeries("series 01", ChartSeriesType.Bar); 
            ChartSeries series02 = new ChartSeries("series 02", ChartSeriesType.Bubble); 
            int j = 0; 
            ArrayList indexSet=new ArrayList(); 
            while (j < dataSet.Tables[0].Rows.Count) 
            { 
                if (itemSet[j] != System.DBNull.Value) 
                { 
                    series01.AddItem(Convert.ToDouble(itemSet[j])); 
                    series02.AddItem((Convert.ToDouble(itemSet[j]))+5); 
                    indexSet.Add(j); 
 
                    //series01.Items[series01.Items.Count - 1].ActiveRegion.Tooltip = "series 01" + (Convert.ToDouble(itemSet[j])).ToString(); 
                    //series02.Items[series02.Items.Count - 1].ActiveRegion.Tooltip = "series 02" + (Convert.ToDouble(itemSet[j])).ToString(); 
                    //series01.Items[series01.Items.Count - 1].ActiveRegion.Tooltip = "onclick=\"alert(test01);\""; 
                    //series02.Items[series02.Items.Count - 1].ActiveRegion.Tooltip = "onclick=\"alert(test02);\""; 
 
                } 
                j++; 
            } 
            this.chart1.Series.Add(series01); 
            this.chart1.Series.Add(series02); 
            this.chart1.Series[0].Items[(int)indexSet[0]].ActiveRegion.Url = @"C:\Demo Projects\Reports\ExportDemo\Default2.aspx"
            this.chart1.Series[0].Items[(int)indexSet[0]].ActiveRegion.Tooltip = "tooltip01"
            this.chart1.Series[0].Items[(int)indexSet[0]].ActiveRegion.Attributes = @"onmouseoveralert('popup01')"
            this.chart1.Series[0].Items[(int)indexSet[1]].ActiveRegion.Url = @"C:\Demo Projects\Reports\ExportDemo\Default.aspx"
            this.chart1.Series[0].Items[(int)indexSet[1]].ActiveRegion.Tooltip = "tooltip02"
            this.chart1.Series[0].Items[(int)indexSet[1]].ActiveRegion.Attributes = @"onmouseoveralert('popup02')";             
        } 

2 Answers, 1 is accepted

Sort by
0
Leonel Fernando
Top achievements
Rank 1
answered on 28 Nov 2013, 03:13 PM
Hi,

The lasted version Telerik Reporting Q3 2013 7.2.13.1016 not resolvel this problem!

The version exposes newly class Graph, the documentation is not clear how to use the Drill-down to a particular series, or by a group of series (SeriesGroups).

var orderDateGroup = new Telerik.Reporting.GraphGroup();
            orderDateGroup.Name = "OrderDateGroup";
  orderDateGroup.Action = this.GetAction();
            graph1.SeriesGroups.Add(orderDateGroup);

 private NavigateToUrlAction GetAction()
        {
            Telerik.Reporting.NavigateToUrlAction UrlAction1 = new Telerik.Reporting.NavigateToUrlAction();
            UrlAction1.Url = "http://google.com.br";

            return UrlAction1;
            
        }

How to work the drill-down in the Points of Graph?

Thanks!

0
Stef
Telerik team
answered on 03 Dec 2013, 02:14 PM
Hello Leonel,

Please take a look at the Lights, Camera, Action! Adding Interactivity to your Telerik Reports blog post and the Graph Item Actions help article, elaborating on the available interactivity with the Graph item.

Try to use the report designer and provided wizards to create a simple report definition with Graph item, and add interactivity to it as explained in the above mentioned articles. Then you can reuse the generated in the designer.cs(vb) code as needed.

I hope this information helps you.

Regards,
Stef
Telerik

New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.

Tags
General Discussions
Asked by
Dhanushka Athukorala
Top achievements
Rank 2
Answers by
Leonel Fernando
Top achievements
Rank 1
Stef
Telerik team
Share this question
or