I create a chart like this
Now i want to add that chart to a Microsoft Report rdlc. How can i do that.
I tried to Google posting on forums but I'm so unlucky and can't find a answer.
This is like one time report so i don't need to store data to database. Just to show it. If you need i can upload entire project so you can understand what am trying.
I transfer all values from Form1 to Report by using Parameters, but i can't transfer chart :S
Anel
VB.NET:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
With Me.chrtRegisterAvailability
.Legends.Clear()
.Series.Clear()
.ChartAreas.Clear()
End With
Dim areas1 As ChartArea = Me.chrtRegisterAvailability.ChartAreas.Add("Areas1")
'With areas1
'End With
Dim series1 As Series = Me.chrtRegisterAvailability.Series.Add("Series1")
With series1
.ChartArea = areas1.Name
.ChartType = SeriesChartType.Pie
.Points.AddXY("Website Impressions", TextBox1.Text)
.Points.AddXY("Social Media", TextBox2.Text)
.Points.AddXY("Clicks", textbox3.text)
End With
Dim T As Title = chrtRegisterAvailability.Titles.Add("Visits by Traffic Source")
With T
.ForeColor = Color.Black
.BackColor = Color.LightBlue
.Font = New System.Drawing.Font("Times New Roman", 9.0F, System.Drawing.FontStyle.Bold)
.BorderColor = Color.Black
End With
Dim legends1 As Legend = Me.chrtRegisterAvailability.Legends.Add("Legends1")
End Sub
Now i want to add that chart to a Microsoft Report rdlc. How can i do that.
I tried to Google posting on forums but I'm so unlucky and can't find a answer.
This is like one time report so i don't need to store data to database. Just to show it. If you need i can upload entire project so you can understand what am trying.
I transfer all values from Form1 to Report by using Parameters, but i can't transfer chart :S
Anel