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

Using chart in reports

5 Answers 227 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Van
Top achievements
Rank 1
Van asked on 06 Nov 2007, 05:45 PM
Hello ,
 I am trying to use a pie chart in my report .Can this be done only programmatically? Quoting the example from the site
"handling NeedDataSource event for the sub report is not required anymore"
Is there a document which explains how to use report wizard or steps in using a chart non programmatically?

Many thanks in advance,
Vaneeth

5 Answers, 1 is accepted

Sort by
0
Chavdar
Telerik team
answered on 07 Nov 2007, 01:37 PM
Hi Van,

Configuring of the Chart report item is done through the Chart Wizard which is launched by right clicking on a Chart report item and selecting Properties. Through the chart wizard you can configure most of the chart's settings. For the rest ones you have to use the Properties window.

In contrast to the SubReport item, the Chart report item still needs the NeedDataSource event get the data. A possible way to achieve this is shown in the Product Line Sales example.

Let me know if you have any other questions.

All the best,
Chavdar
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Maxime
Top achievements
Rank 1
answered on 16 Nov 2007, 03:22 PM
Hi,

In the NeedDataSource function, can we reach data pre-calculate by the report to avoid having to recompute by query ?

Best regards,
0
Chavdar
Telerik team
answered on 16 Nov 2007, 07:37 PM
Hi Sébastien,

You can get the data for the row being processed through the DataItem property. It contains a DataRowView object through which you can access the data fields used in the report.

Here is an example:

    void chart1_NeedDataSource(object sender, System.EventArgs e)
     {
        Telerik.Reporting.Processing.Chart chart = (Telerik.Reporting.Processing.Chart)sender;
        DataRowView dataRowView = (DataRowView)chart.DataItem;
        ...
     }     


You can also examine the following article.

Let me know if you have any further questions.

All the best,
Chavdar
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Maxime
Top achievements
Rank 1
answered on 17 Nov 2007, 02:41 PM
Hi,

I want in fact acces to data was calculated by report (sums for example) to display a graph with these data.

The DataRowView I acces with your method contains only one row.

Best regards,
0
Chavdar
Telerik team
answered on 19 Nov 2007, 01:23 PM
Hi Sébastien,

Unfortunately there is no way to access the calculated data at this moment.
However, you can open a support ticket and send us a more detailed description of what exactly you desire to achieve so that we can offer you a workaround if possible.

Thank you.

Sincerely yours,
Chavdar
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
General Discussions
Asked by
Van
Top achievements
Rank 1
Answers by
Chavdar
Telerik team
Maxime
Top achievements
Rank 1
Share this question
or