p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Register | 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 p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 18th, 2004, 04:30 PM
Registered User
Points: 10, Level: 1
Points: 10, Level: 1 Points: 10, Level: 1 Points: 10, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Ch 3 Examples Don't Work

I am trying to run the examples in Chapter 3. The example "viewer_ database" runs but prompts you for login information despite having login information in code.

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
   Dim myReport = New ch3_worldsales_northwind()
   Dim myTableLogonInfos = New CrystalDecisions.Shared.TableLogOnInfos()
   Dim myTableLogonInfo = New CrystalDecisions.Shared.TableLogOnInfo()
   Dim myConnectionInfo = New CrystalDecisions.Shared.ConnectionInfo()
   With myConnectionInfo
     .ServerName = "localhost"
     .DatabaseName = "Northwind"
     .UserID = "sa"
     .Password = ""
   End With

   myTableLogonInfo.ConnectionInfo = myConnectionInfo
   myTableLogonInfo.TableName = "customers"
   myTableLogonInfos.Add(myTableLogonInfo)
   CrystalReportViewer1.LogOnInfo = myTableLogonInfos
   CrystalReportViewer1.ReportSource = myReport
   ch3_worldsales_northwind()
End Sub

Does anybody have a fix for this?

Any help is greatly appreciated.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old May 11th, 2004, 01:39 PM
Friend of Wrox
Points: 335, Level: 6
Points: 335, Level: 6 Points: 335, Level: 6 Points: 335, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Indianapolis, IN, USA.
Posts: 124
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Are you still having problem with this code?

XUMUSKIEFAN
Wrox Moderator
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old December 3rd, 2004, 06:41 PM
Registered User
Points: 2, Level: 1
Points: 2, Level: 1 Points: 2, Level: 1 Points: 2, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

adding the following line after the with...end with:
MyReport.Database.Tables(0).ApplyLogOnInfo(myTable LogonInfo)

For me that alone did not provide the complete solution. I went to the report that was added to the project (ch3_worldsales_northwind.rpt) and opened it up. Then right click any where on the report, select database, select 'set database location' and pointed it to the copy in c:\program files\microsoft office\office\samples\northwind.mdb and clicked update. I also did a verify database (right click, database, verify database). This is what worked for me. Hope it helps some one else

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #4 (permalink)  
Old February 15th, 2005, 11:36 AM
Registered User
Points: 2, Level: 1
Points: 2, Level: 1 Points: 2, Level: 1 Points: 2, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Please not that there is an error in code (and in the ch3 report...):
The correct line in code is:
myTableLogonInfo.TableName = "Customer"

(correct table name in the ch3_worldsales_northwind.rpt report, even if the real name of the table, in Northwind, is Customers...)

and not
myTableLogonInfo.TableName = "customers"

Please not that you have to use C (Uppercase)


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How ch. 11 examples return false for ctrlKey? horseatingweeds BOOK: Professional JavaScript for Web Developers ISBN: 978-0-7645-7908-0 1 March 18th, 2008 01:01 AM
db2 doesn't work as a db for RoR examples rafmathijs BOOK: Beginning Ruby on Rails 0 August 30th, 2007 04:50 AM
Recommended setup to work thru the examples? kjullion BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 1 February 13th, 2006 12:44 PM
code examples do not work cannot connect to server bleepbloop BOOK: Professional ASP.NET 1.0, Special Edition/1.1 3 April 13th, 2004 11:50 AM
unable to run ch 10 examples jgtez JSP Basics 0 February 24th, 2004 09:22 PM



All times are GMT -4. The time now is 04:45 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc