
Rookie CR - .NET web form question
I'm trying to convert the CR ADO.NET example from
C## to VB .NET, and
the problem I keep having is that Visual Studio is telling me that
"CrystalReportViewer1" name is not declared. Following is my code:
Imports System.Data.OleDb
Public Class WebForm1
Inherits System.Web.UI.Page
Public oRpt As CrystalReport1 = New CrystalReport1()
Public objDataset As Dataset1 = New Dataset1()
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.De{*filter*}StepThrough()> Private Sub
InitializeComponent()
End Sub
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
InitializeComponent()
Dim oleConn As OleDbConnection = New
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\!crap\nv3.mdb")
Dim dataAdapter As OleDbDataAdapter = New
OleDbDataAdapter("SELECT * FROM LendProfile", oleConn)
dataAdapter.Fill(objDataset, "LendProfile")
oRpt.SetDataSource(objDataset)
CrystalReportViewer1.ReportSource = oRpt
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
End Sub
End Class