vb.net制作报表控件 winform报表控件
如何用VB.NET做水晶报表?
CrystalReportViewer
钟楼网站建设公司创新互联公司,钟楼网站设计制作,有大型网站制作公司丰富经验。已为钟楼近千家提供企业网站建设服务。企业网站搭建\成都外贸网站建设公司要多少钱,请找那个售后服务好的钟楼做网站的公司定做!
dataset 定义数据源
.rpt 文件描述具体报表样式
再加一个调用报表的FORM,就可以实现简单的报表功能
Option Explicit
dim Report as New Cystal1
Private Sub Form_Load()
Screen.MousePointer = vbHourglass
'调用水晶报表时置鼠标为沙漏状 CRViewer91.ReportSource = Report '该语句的赋值将在后面被修改
CRViewer91.ViewReport
Screen.MousePointer = vbDefault '调用水晶报表完成后置鼠标为默认形状
End Sub
Private Sub Form_Resize()
CRViewer91.Top = 0
CRViewer91.Left = 0
CRViewer91.Height = ScaleHeight
CRViewer91.Width = ScaleWidth
End Sub
vb.net怎么使用表格控件
DataGridView控件,放一个DataGridView1和Button1到窗体,下面是按钮下代码
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Me.DataGridView1.AllowUserToAddRows = False
DataGridView1.RowTemplate.Height = 200
DataGridView1.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.None
For i = 1 To 3
Me.DataGridView1.Columns.Add("列" i.ToString, "列" i.ToString)
Me.DataGridView1.Rows.Add()
Next
Me.DataGridView1.Columns(0).Width = 100
Me.DataGridView1.Columns(1).Width = 500
Me.DataGridView1.Columns(0).Width = 300
End Sub
'自己设置相关需要的属性即可
vb.net怎么使用表格控件?
DataGridView控件,放一个DataGridView1和Button1到窗体,下面是按钮下代码\x0d\x0a Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click\x0d\x0a Me.DataGridView1.AllowUserToAddRows = False\x0d\x0a DataGridView1.RowTemplate.Height = 200\x0d\x0a DataGridView1.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.None\x0d\x0a For i = 1 To 3\x0d\x0a Me.DataGridView1.Columns.Add("列" i.ToString, "列" i.ToString)\x0d\x0a Me.DataGridView1.Rows.Add()\x0d\x0a Next\x0d\x0a Me.DataGridView1.Columns(0).Width = 100\x0d\x0a Me.DataGridView1.Columns(1).Width = 500\x0d\x0a Me.DataGridView1.Columns(0).Width = 300\x0d\x0a End Sub\x0d\x0a'自己设置相关需要的属性即可
文章题目:vb.net制作报表控件 winform报表控件
文章分享:http://scjbc.cn/article/docjeeg.html