Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional Crystal Reports for VS.NET
This is the forum to discuss the Wrox book Professional Crystal Reports for Visual Studio .NET by David McAmis; ISBN: 9780764544033
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Crystal Reports for VS.NET 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
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 4th, 2003, 01:06 PM
Registered User
 
Join Date: Aug 2003
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Running examples in text

I have been unable to successfully run the downloaded examples. I have made the directory listed in the text and put the samples in it. I have copied the database, Xtreme, to the location (in C:\program files, etc.) specified in the text.

When I try to run an example, I get a Login failed exception. Sometimes (before I get the exception), I am presented with a LogIn message box. The code has statements setting the login and password. I certainly haven't modified that code. And entering the same Id and password in the message box is not successful.

I am using Visual Studio .Net 2003. This is my first experience with Crystal Reports. All of the examples have to be reformatted (by the installed 2003 software), so I gather that they were written and distributed before 2003 Visual Studio.

I will appreciate Help. J Lee
Reply With Quote
  #2 (permalink)  
Old January 15th, 2004, 04:08 PM
Registered User
 
Join Date: Jan 2004
Location: Saskatoon, SK, Canada.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Bullhorn Send a message via MSN to Bullhorn
Default

I ran into this problem too. I overcame it by finding some code on http://www.planet-source-code.com (below), but I was hoping to find an explanation for this, or maybe an adjustment to the book's code by the author that showed his preferred method of dealing with this since I am a CR newb.



    '''-------------------------------------------------------------
    ''' <summary>
    ''' Add a reportviewer control to the page - call it crv
    ''' Add a reportdocument control to the page
    ''' Select the report you designed (EmployeeHours)
    ''' use the code here to login and show report in browser
    ''' </summary>
    ''' <param name="sender"></param>
    ''' <param name="e"></param>
    ''' <remarks></remarks>
    ''' <history>
    ''' [andrew] 1/7/2004 Created
    ''' </history>
    '''-------------------------------------------------------------
    Private Sub crv_load(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles crv.Load
        Dim crReport As ReportDocument
        crReport = New EmployeeHours
        ApplyLogOnInfoTo(crReport)
        crv.ReportSource = crReport
    End Sub

    Private Sub ApplyLogOnInfoTo(ByRef crReport As ReportDocument)
        Dim crLogonInfo As CrystalDecisions.Shared.TableLogOnInfo
        crLogonInfo = crReport.Database.Tables(0).LogOnInfo
                      ' what if more than one table is used?
        crLogonInfo.ConnectionInfo.ServerName = "servername"
        crLogonInfo.ConnectionInfo.DatabaseName = "dbname"
        crLogonInfo.ConnectionInfo.UserID = "sa"
        crLogonInfo.ConnectionInfo.Password = "sapwd"
        crReport.Database.Tables(0).ApplyLogOnInfo(crLogon Info)
    End Sub

Reply With Quote
  #3 (permalink)  
Old January 15th, 2004, 05:33 PM
Registered User
 
Join Date: Aug 2003
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you User Bullhorn for the good info.

J Lee Heikkinen
Reply With Quote
Reply


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
Running the examples on a stand alone computer MustfaZfar BOOK: ASP.NET AJAX Programmer's Reference : with ASP.NET 2.0 or ASP.NET 3.5 ISBN: 978-0-470-10998-4 0 December 13th, 2007 01:49 PM
Error - Running examples BadKarma BOOK: Professional XNA Game Programming: For Xbox 360 and Windows ISBN: 978-0-470-12677-6 0 October 31st, 2007 05:44 PM
Problems running Beginning ASP.NET 2.0 examples ymak ASP.NET 2.0 Basics 0 June 4th, 2006 05:02 AM
Terrible Editing, Broken Examples, Rotten text treycarroll Wrox Book Feedback 26 October 31st, 2004 07:44 PM



All times are GMT -4. The time now is 02:50 AM.


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