我需要创建一个数据库,它只能在form1上的文本框中存储三个值。每次我点击按钮,它都会存储在这些文件上。
这是必需的,因为我需要在报告上创建图表。为了创建报告,我需要使用数据库(因为没有其他方法)。
那么这是最好的解决方案。目前我正在创建这样的图表但是无法在.rdlc MS报表上设置此图表。
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