Advertisement

05.15.2008 at 10:43AM PDT, ID: 23406040
[x]
Attachment Details

changing connection string at runtime

Asked by ldcray in Crystal Reports Software, Microsoft Visual Basic.Net

Tags: crystal reports

I am using crystal reports 10, vb6 cr designers, and sql server 200
things work great as long as i run the cr designer where it was developed when I try to run it on another server i get the error msg
"file could not be found"
I will attach code snippetStart Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
Dim crRpt As New CRAXDDRT.Report
Dim ConnectionInfo As CRAXDDRT.ConnectionProperties
 
    Set crRpt = ReconcileEPICSInvoicesbyLOBtoSolomon
    crRpt.ReportComments = "Dates Start: " & Date1 & " End: " & Date2
 
    crRpt.VerifyOnEveryPrint = True
    crRpt.DiscardSavedData
'******************************************************************************************
 
'   crDB = "AV_EPICS": crUSERID = "aviation": crPasSWORD = "ToneniliTicholtsodi1": crPROVIDER = "MSDasQL.1"                  
 
    Set ConnectionInfo = crRpt.DataBase.Tables(1).ConnectionProperties
    crRpt.DataBase.Tables(1).DllName = "crdb_odbc.dll"
    ConnectionInfo.DeleteAll
    ConnectionInfo.Add "Data Source", crDB
    ConnectionInfo.Add "DSN", crDB
    ConnectionInfo.Add "User ID", crUSERID
    ConnectionInfo.Add "Password", crPasSWORD
    ConnectionInfo.Add "Initial Catalog", crDB
    ConnectionInfo.Add "Provider", crPROVIDER
 
    
    theViewer.ReportSource = crRpt
    Call Sleep(10)
    DoEvents
    theViewer.ViewReport
    While theViewer.IsBusy
          Call Sleep(20)
          DoEvents
    Wend
    Screen.MousePointer = vbDefault
[+][-]05.15.2008 at 11:01AM PDT, ID: 21576476

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.16.2008 at 06:26AM PDT, ID: 21582444

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.16.2008 at 07:31AM PDT, ID: 21583058

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Crystal Reports Software, Microsoft Visual Basic.Net
Tags: crystal reports
Sign Up Now!
Solution Provided By: mlmcc
Participating Experts: 2
Solution Grade: A
 
 
[+][-]05.16.2008 at 10:26AM PDT, ID: 21584674

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.16.2008 at 08:17PM PDT, ID: 21587858

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.18.2008 at 09:01AM PDT, ID: 21593123

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]05.22.2008 at 09:41AM PDT, ID: 21625441

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628