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

Chart's title inside reporting

1 Answer 51 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
hin
Top achievements
Rank 1
hin asked on 09 Mar 2012, 01:28 AM
I am creating a set of reports, each with 1-2 charts.  How do I set the title at run time using the reportviewer?

Sample of my aspx code:

 Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            Dim report As New MyReports.RevByOffice
            ReportViewer1.Report = report
        End If
End Sub

I am using Reporting Q3 2011.  Once I have all the reports designed, then I will put all the reports into a ReportBook.

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 09 Mar 2012, 09:53 AM
Hello,

Here is a sample code snippet, using the flexible Reporting API:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            Dim report As New MyReports.RevByOffice
            Dim chart As Telerik.Reporting.Chart = TryCast(report.Items.Find("chart1", True)(0), Telerik.Reporting.Chart)
            chart.ChartTitle.TextBlock.Text = "New Title"
            ReportViewer1.Report = report
        End If  
End Sub

Greetings,
Steve
the Telerik team
NEW in Q1'12: Telerik Report Designer (Beta) for ad-hoc report creation. Download as part of Telerik Reporting Q1 2012. For questions and feedback, use the new Telerik Report Designer Forum.
Tags
General Discussions
Asked by
hin
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or