|
|
 |
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.
|
 |

March 18th, 2004, 04:30 PM
|
|
Registered User
|
|
Join Date: Mar 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|

May 11th, 2004, 01:39 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Location: Indianapolis, IN, USA.
Posts: 124
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Are you still having problem with this code?
XUMUSKIEFAN
Wrox Moderator
|

December 3rd, 2004, 06:41 PM
|
|
Registered User
|
|
Join Date: Dec 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|

February 15th, 2005, 11:36 AM
|
|
Registered User
|
|
Join Date: Feb 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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)
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |