Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Closed Thread
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 19th, 2004, 10:13 PM
Authorized User
 
Join Date: Feb 2004
Location: , , .
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
Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



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


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