Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
|
Crystal Reports General discussion about Crystal Reports. For discussions specific to the book Professional Crystal Reports for VS.NET, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Crystal Reports section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 19th, 2004, 10:13 PM
Authorized User
 
Join Date: Feb 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.

Code:
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 "
        PrintMonthlyPCAdapter1.Fill(DsPrintMonthlyPC1)

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


           Me.PrintMonthlyPCViewer1.ReportSource = aPrintMonthlyPC

        Catch ex As Exception
           MsgBox("Exception")
        End Try
    End Sub





Similar Threads
Thread Thread Starter Forum Replies Last Post
how to view crystal report in asp.net bhaveshsanghani BOOK: Professional Crystal Reports for VS.NET 1 October 26th, 2014 12:10 AM
problem with crystal report in asp.net 1.1 robyjoseph ASP.NET 1.0 and 1.1 Professional 0 February 20th, 2007 01:27 AM
using crystal report with asp.net ehc2082 Crystal Reports 0 January 6th, 2005 10:33 PM
crystal report in asp.net wynn ASP.NET 1.x and 2.0 Application Design 1 June 14th, 2004 10:16 AM
crystal report in asp.net wynn BOOK: Professional Crystal Reports for VS.NET 1 June 12th, 2004 05:29 AM





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