Click here to Skip to main content
15,895,792 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionExternal Images Pin
Stephen Lintott26-Mar-09 2:31
Stephen Lintott26-Mar-09 2:31 
AnswerRe: External Images Pin
Anubhava Dimri31-Mar-09 0:05
Anubhava Dimri31-Mar-09 0:05 
QuestionCount number of similar lines Pin
vijay248226-Mar-09 0:58
vijay248226-Mar-09 0:58 
AnswerRe: Count number of similar lines Pin
JernejR26-Mar-09 1:02
JernejR26-Mar-09 1:02 
GeneralRe: Count number of similar lines Pin
vijay248226-Mar-09 1:13
vijay248226-Mar-09 1:13 
AnswerRe: Count number of similar lines Pin
Eddy Vluggen26-Mar-09 2:14
professionalEddy Vluggen26-Mar-09 2:14 
AnswerRe: Count number of similar lines Pin
Anubhava Dimri31-Mar-09 0:16
Anubhava Dimri31-Mar-09 0:16 
Questionhow to change provider in crystal report runtime Pin
JernejR26-Mar-09 0:02
JernejR26-Mar-09 0:02 
Hay developers

In Visual studio 2005 in Crystal Report Editor you can find "Set datasource location...". There you can change everything (mapping, datasource, even dataprovider). So far so good, but if you want to change DATAPROVIDER runtime (in code) you have big problem. You can change datasource to other database on the same platform, but you cannot change ORACLE to SQL database ??

It seems that changing DATABASENAME doesn't do anything. This is understandable because ORACLE (i design report originaly for ORACLE) does't have database name, you just specified SERVERNAME, USERID and PASSWORD.

So I think the problem lies in fact that you cannot change PROVIDER runtime??

So basicaly I'm able to change provider from ORACLE to SQL in IDE with no problem but not on runtime

I try allmost everything and nothing works form me (see example below).

BTW I'm IT pro and I know what I'm doing, so don't answer to my question like "do you have SQL started" or "is your password writen correct"
no ofense Roll eyes | :rolleyes:

If you have hundrets of report you cannot do this thru IDE.

Please help

Best regards Jerry

<br />
   Public Sub sub_ApplyInfo1(ByRef _oRpt As CrystalDecisions.CrystalReports.Engine.ReportDocument, _<br />
                   ByVal _dbName As String, _<br />
                   ByVal _serverName As String, _<br />
                   ByVal _userID As String, _<br />
                   ByVal _passWord As String, Optional ByVal _IntegratedSecurity As Boolean = False)<br />
<br />
<br />
        Dim oCRDb As CrystalDecisions.CrystalReports.Engine.Database = _oRpt.Database<br />
        Dim oCRTables As CrystalDecisions.CrystalReports.Engine.Tables = oCRDb.Tables<br />
<br />
        Dim oCRTableLogonInfo As CrystalDecisions.Shared.TableLogOnInfo<br />
        Dim oCRConnectionInfo As CrystalDecisions.Shared.ConnectionInfo = New CrystalDecisions.Shared.ConnectionInfo<br />
<br />
<br />
        oCRConnectionInfo.IntegratedSecurity = _IntegratedSecurity<br />
        oCRConnectionInfo.Type = ConnectionInfoType.CRQE<br />
        oCRConnectionInfo.ServerName = _serverName<br />
<br />
        If _dbName <> "" Then<br />
            oCRConnectionInfo.DatabaseName = _dbName<br />
        End If<br />
        If _userID <> "" Then<br />
            oCRConnectionInfo.UserID = _userID<br />
        End If<br />
        If _passWord <> "" Then<br />
            oCRConnectionInfo.Password = _passWord<br />
        End If<br />
<br />
        For Each oCRTable As CrystalDecisions.CrystalReports.Engine.Table In oCRTables<br />
            oCRTableLogonInfo = oCRTable.LogOnInfo<br />
            oCRTableLogonInfo.ConnectionInfo = oCRConnectionInfo<br />
            oCRTable.ApplyLogOnInfo(oCRTableLogonInfo)<br />
            'Dim lcLocation As String = oCRConnectionInfo.DatabaseName & ".dbo." & oCRTable.Location<br />
        Next<br />
<br />
        'Dim cry_logOnInfo As New CrystalDecisions.Shared.TableLogOnInfo<br />
        ''Me.sub_ApplyInfo(oRpt, "FIN", "MYPC\SQLEXPRESS", "", "", True)<br />
<br />
        'cry_logOnInfo.ConnectionInfo.ServerName = "MYPC\SQLEXPRESS"<br />
        'cry_logOnInfo.ConnectionInfo.DatabaseName = "FIN"<br />
        'cry_logOnInfo.ConnectionInfo.UserID = ""<br />
        'cry_logOnInfo.ConnectionInfo.Password = ""<br />
        'cry_logOnInfo.ConnectionInfo.IntegratedSecurity = True<br />
<br />
        'Dim oTable As CrystalDecisions.CrystalReports.Engine.Table<br />
        'For Each oTable In _oRpt.Database.Tables<br />
        '    oTable.ApplyLogOnInfo(cry_logOnInfo)<br />
        'Next<br />
    End Sub<br />
<br />

AnswerRe: how to change provider in crystal report runtime Pin
Skymir27-Mar-09 8:51
Skymir27-Mar-09 8:51 
AnswerRe: how to change provider in crystal report runtime Pin
Anubhava Dimri31-Mar-09 0:26
Anubhava Dimri31-Mar-09 0:26 
QuestionOutput Differs Pin
vijay248225-Mar-09 23:33
vijay248225-Mar-09 23:33 
AnswerRe: Output Differs Pin
Tom Deketelaere25-Mar-09 23:40
professionalTom Deketelaere25-Mar-09 23:40 
GeneralRe: Output Differs Pin
vijay248226-Mar-09 0:54
vijay248226-Mar-09 0:54 
AnswerRe: Output Differs Pin
JernejR26-Mar-09 0:58
JernejR26-Mar-09 0:58 
AnswerRe: Output Differs Pin
Luc Pattyn26-Mar-09 0:58
sitebuilderLuc Pattyn26-Mar-09 0:58 
QuestionUsing SMTP, the email is sent only when the Form is closed Pin
paulogomes25-Mar-09 16:30
paulogomes25-Mar-09 16:30 
AnswerRe: Using SMTP, the email is sent only when the Form is closed Pin
Henry Minute26-Mar-09 1:48
Henry Minute26-Mar-09 1:48 
GeneralRe: Using SMTP, the email is sent only when the Form is closed Pin
paulogomes26-Mar-09 7:36
paulogomes26-Mar-09 7:36 
GeneralRe: Using SMTP, the email is sent only when the Form is closed Pin
Luc Pattyn26-Mar-09 9:02
sitebuilderLuc Pattyn26-Mar-09 9:02 
GeneralRe: Using SMTP, the email is sent only when the Form is closed Pin
paulogomes26-Mar-09 9:14
paulogomes26-Mar-09 9:14 
GeneralRe: Using SMTP, the email is sent only when the Form is closed Pin
Henry Minute26-Mar-09 9:12
Henry Minute26-Mar-09 9:12 
AnswerRe: Using SMTP, the email is sent only when the Form is closed Pin
Luc Pattyn26-Mar-09 9:50
sitebuilderLuc Pattyn26-Mar-09 9:50 
GeneralRe: Using SMTP, the email is sent only when the Form is closed Pin
paulogomes26-Mar-09 10:49
paulogomes26-Mar-09 10:49 
GeneralRe: Using SMTP, the email is sent only when the Form is closed Pin
Luc Pattyn26-Mar-09 10:59
sitebuilderLuc Pattyn26-Mar-09 10:59 
GeneralRe: Using SMTP, the email is sent only when the Form is closed Pin
paulogomes26-Mar-09 11:38
paulogomes26-Mar-09 11:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.