View Single Post
  #1 (permalink)  
Old February 19th, 2004, 10:13 PM
chinhow chinhow is offline
Authorized User
Join Date: Feb 2004
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Crystal Report

hi, I'm a newbie of developer, and I have face a problem when creating a crystal report. The way i created the crystal report is same as i created in VB.NET windows desktop application. But it seemed doesn't work in ASP.NET. When the Page_Load() executed, there is an error message shown as "An object is not set as an instance of an object". I know the code is slightly different between and when creating the crystal report.

My environment as below:
1. using Microsoft visual 2002
2. Database, MS Access 2000
3. WinXP professional (OS)
4. Code below is from the web form

I hope there is someone can provide me some complete example or provide me some guidelines of how to develop crystal report in if you are experienced in this issue.

Thanks and hope can hear from you all soon.

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
        Dim aPrintMonthlyPC As New ReportDocument()

        PrintMonthlyPCAdapter1.SelectCommand.CommandText = _
        "SELECT * FROM Employee "

           Dim aPrintMonthlyPC As ReportPrintMonthlyPC
           aPrintMonthlyPC = New ReportPrintMonthlyPC()
           Me.PrintMonthlyPCViewer1.DisplayGroupTree = True

           Me.PrintMonthlyPCViewer1.ReportSource = aPrintMonthlyPC

        Catch ex As Exception
        End Try
    End Sub