p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Crystal Reports (http://p2p.wrox.com/forumdisplay.php?f=113)
-   -   asp.net Crystal Report (http://p2p.wrox.com/showthread.php?t=9585)

chinhow February 19th, 2004 10:13 PM

asp.net Crystal Report
hi, I'm a newbie of asp.net developer, and I have face a problem when creating a asp.net 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 asp.net and vb.net when creating the crystal report.

My environment as below:
1. using Microsoft visual studio.net 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 asp.net 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

All times are GMT -4. The time now is 05:29 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.