Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old January 28th, 2005, 03:22 AM
kmalika kmalika is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 24 kmalika User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 m
Reputation Power: 0
how to connect crystal report through two server in my vb project

hi all
i'm using vb and calling my cystal report in the project .in crystal report two databases are there with different servers.but its not connecting .i've made ADODB connection globally i.e
option Explicit
Global CN1 As ADODB.Connection
Global CN2 As ADODB.Connection
Public Sub connecttootherdatabase()
Set CN1 = New ADODB.Connection
CN1.Open ("Provider=SQLOLEDB.1;Password=rptuser;Persist Security Info=True;User ID=rptuser;Initial Catalog=SDS;Data Source=myIP1")
Set CN2 = New ADODB.Connection

CN2.Open ("Provider=SQLOLEDB.1;Password=scala;Persist Security Info=True;User ID=scala;Initial Catalog=scalaDB;Data Source=muIP2")
End Sub


and in the form level i'm writing

Private Sub mnuprint_Click()
CrystalReport1.Reset

'CrystalReport1.WindowShowPrintSetupBtn = True
CrystalReport1.co = CN1.ConnectionString
CrystalReport1.Connect = CN2.ConnectionString
CrystalReport1.ReportFileName = App.Path & "\Reportcredit2.rpt"
CrystalReport1.Action = 1
End Sub

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > how to connect crystal report through two server in my vb project


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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 On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT