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
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 28th, 2004, 01:47 AM
Registered User
 
Join Date: Jun 2004
Location: Pune, Maharashtra, India.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Setting Crystal Report Server & Database

I am using crystal report in vb.net. i have build the crystal report ItemList.rpt. while design mode i have select SQL Server "ABC" as provider for the report and MYDatabase1 as source for he report. I have designed the report and if run through application, it works fine. Now I want to change the server name & database name for this crystal report file. for this i have used following code ..

Dim LogOnInfo As New CrystalDecisions.Shared.TableLogOnInfo()
Dim connectionInfo As New CrystalDecisions.Shared.ConnectionInfo()
Dim table As CrystalDecisions.CrystalReports.Engine.Table
Dim sItemList as new rptItemList ' this is report file instance

For Each table In sItemList.Database.Tables
     LogOnInfo = table.LogOnInfo
     ' Set the server or ODBC data source name, database name,
     ' user ID, and password.
     LogOnInfo.ConnectionInfo.ServerName = "XYZ"
     LogOnInfo.ConnectionInfo.DatabaseName = "NewDatabase"
     LogOnInfo.ConnectionInfo.UserID = "sa"
     LogOnInfo.ConnectionInfo.Password = ""
     ' Apply the connection information to the table.
     table.ApplyLogOnInfo(LogOnInfo)
Next table
sItemList.Refresh()
cr1.ReportSource = sItemList

After this if I check the logon info as ServerName, Database is changed to the newly assigned values, but the item list is shown from the ABC Servber's MyDatabase (from Database at design time.)

Can u solve this problem or suggest another method to perform this task please inform me maheshkumar_jadhav@yahoo.co.in


Maheshkumar Jadhav
Reply With Quote
  #2 (permalink)  
Old June 29th, 2004, 12:12 AM
Friend of Wrox
Points: 3,558, Level: 25
Points: 3,558, Level: 25 Points: 3,558, Level: 25 Points: 3,558, Level: 25
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: California, USA
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

Plz take a look at http://p2p.wrox.com/topic.asp?TOPIC_ID=6389

What is that Refresh for?!

Always:),
Hovik Melkomian.
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
Crystal Report & VB6 & SQL Server wlho VB How-To 2 June 5th, 2013 01:58 AM
Chapter 15 15_1 & 15_2 and setting up SQL server a3321889495 BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 0 July 13th, 2006 06:19 AM
Setting up & Connecting to SQL Server Scripts82 SQL Server 2000 1 March 9th, 2006 06:16 AM
Setting up stored procedure for Crystal Report.... potato3 SQL Language 1 December 9th, 2004 12:33 PM
Setting path to local "C" drive for crystal report rajupusapati Crystal Reports 2 June 17th, 2004 11:47 AM



All times are GMT -4. The time now is 01:10 AM.


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