Wrox Programmer Forums
|
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 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 August 4th, 2003, 01:06 PM
Registered User
 
Join Date: Aug 2003
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
 
Old January 15th, 2004, 04:08 PM
Registered User
 
Join Date: Jan 2004
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

 
Old January 15th, 2004, 05:33 PM
Registered User
 
Join Date: Aug 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you User Bullhorn for the good info.

J Lee Heikkinen





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





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