使用已有的报表模板案例名称:使用已有的报表模板工程名称:Proj6-1

Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim dir As String

dir = System.Environment.CurrentDirectory

Dim path = dir.Substring(0, dir.LastIndexOf(\"\" - 3))

'MessageBox.Show(path + \"Hierarchical Grouping.rpt\")

CrystalReportViewer1.ReportSource = path + \"Hierarchical Grouping.rpt\"

End Sub

End Class