Click here to Skip to main content
15,886,873 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: CRAXDRT.ConnectionPropertiesClass.getItem(String Name) "Error: Invalid Index" Pin
_Damian S_16-Apr-08 18:07
professional_Damian S_16-Apr-08 18:07 
GeneralRe: CRAXDRT.ConnectionPropertiesClass.getItem(String Name) "Error: Invalid Index" Pin
vbDigger'z16-Apr-08 21:56
vbDigger'z16-Apr-08 21:56 
GeneralRe: CRAXDRT.ConnectionPropertiesClass.getItem(String Name) "Error: Invalid Index" Pin
Mycroft Holmes15-Apr-08 22:07
professionalMycroft Holmes15-Apr-08 22:07 
GeneralRe: CRAXDRT.ConnectionPropertiesClass.getItem(String Name) "Error: Invalid Index" Pin
vbDigger'z15-Apr-08 22:19
vbDigger'z15-Apr-08 22:19 
GeneralRe: CRAXDRT.ConnectionPropertiesClass.getItem(String Name) "Error: Invalid Index" Pin
ChandraRam15-Apr-08 23:56
ChandraRam15-Apr-08 23:56 
GeneralRe: CRAXDRT.ConnectionPropertiesClass.getItem(String Name) "Error: Invalid Index" Pin
vbDigger'z16-Apr-08 14:21
vbDigger'z16-Apr-08 14:21 
GeneralRe: CRAXDRT.ConnectionPropertiesClass.getItem(String Name) "Error: Invalid Index" Pin
ChandraRam16-Apr-08 19:52
ChandraRam16-Apr-08 19:52 
GeneralRe: CRAXDRT.ConnectionPropertiesClass.getItem(String Name) "Error: Invalid Index" [modified] Pin
vbDigger'z16-Apr-08 21:53
vbDigger'z16-Apr-08 21:53 
Your are still using assignments like

crxConnectionProperty = crxTable.ConnectionProperties("Data Source") = crxDataBasePath

This is similar to saying:

x = y = 5

The result stored in x will be either true or false, depending upon whether value of y is 5.
*********************

actually, not really...

i just made so many experimentation and also base on other post from the internet..

i've also try this code
**************************
<br />
<br />
    Public crxApp As CRAXDRT.Application<br />
    Public crxReport As CRAXDRT.Report<br />
    Public crxDataBase As CRAXDRT.Database<br />
    Public crxTable As CRAXDRT.DatabaseTable<br />
    Public crxTables As CRAXDRT.DatabaseTables<br />
    Public crxConnectionProperty As CRAXDRT.ConnectionProperty<br />
<br />
    Private Sub frmCrystalReport_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
        Try<br />
<br />
            crxApp = New CRAXDRT.Application<br />
<br />
            crxReport = crxApp.OpenReport(strCRSourcePath, CrystalDecisions.Shared.OpenReportMethod.OpenReportByDefault)<br />
<br />
            For Each crxTable In crxReport.Database.Tables<br />
<br />
                crxConnectionProperty = crxTable.ConnectionProperties.Item("Data Source")<br />
                crxConnectionProperty.Value = "D:\Folder1\Folder2\DatabseFolder"<br />
                crxConnectionProperty = crxTable.ConnectionProperties.Item("Initial Catalog")<br />
                crxConnectionProperty.Value = "myDataBase.mdb"<br />
                crxConnectionProperty = crxTable.ConnectionProperties.Item("User ID")<br />
                crxConnectionProperty.Value = "xxxxxxxxx"<br />
                crxConnectionProperty = crxTable.ConnectionProperties.Item("Password")<br />
                crxConnectionProperty.Value = "xxxxxxxxx"<br />
<br />
            Next crxTable<br />
<br />
            crxReport.Database.Verify()<br />
<br />
            crxReport.SQLQueryString = strSelectionfrm<br />
<br />
            AxCRViewer1.ReportSource = crxReport<br />
            AxCRViewer1.ViewReport()<br />
<br />
            crxDataBase = Nothing<br />
            crxTable = Nothing<br />
            crxTables = Nothing<br />
            crxReport = Nothing<br />
            crxApp = Nothing<br />
<br />
        Catch ex As Exception<br />
            MsgBox(ex.ToString())<br />
        Finally<br />
            Me.Cursor = Cursors.Default<br />
        End Try<br />
    End Sub<br />

*******************************
and still??? the same error...

and i've also try this code and still the same error.. Frown | :( Cry | :((
*******************************
<br />
crxConnectionProperty = crxTable.ConnectionProperties.Item("Data Source")<br />
crxConnectionProperty.Value = "D:\Folder1\Folder2\DatabseFolder\myDatabase.mdb"<br />


or neither like this... still the same error... Frown | :(

<br />
crxConnectionProperty = crxTable.ConnectionProperties.Item("Data Source")<br />
crxConnectionProperty.Value = "D:\Folder1\Folder2\DatabseFolder"<br />

**************


this VS VB2005 and CR XI R2 is freaking me out and im very frustrated.... Cry | :((
please help... anybody... please... Frown | :(

thank you so much again to those who are formerly participating with this topic... thanks guys... a lot of appreciation to all of you...

modified on Thursday, April 17, 2008 4:01 AM

GeneralI think so i know whats wrong with my vb project... its not on the code but the versioning of active x component [modified] Pin
vbDigger'z17-Apr-08 18:04
vbDigger'z17-Apr-08 18:04 
Questionextract OLE Object from MS-Access Table using vb6 Pin
ERLN15-Apr-08 18:05
ERLN15-Apr-08 18:05 
GeneralRe: extract OLE Object from MS-Access Table using vb6 Pin
Dave Kreskowiak16-Apr-08 3:23
mveDave Kreskowiak16-Apr-08 3:23 
GeneralException has been thrown by the target of an invocation Pin
tom8315-Apr-08 17:56
tom8315-Apr-08 17:56 
GeneralRe: Exception has been thrown by the target of an invocation Pin
Arjun Marwaha15-Apr-08 20:50
Arjun Marwaha15-Apr-08 20:50 
GeneralRe: Exception has been thrown by the target of an invocation Pin
Mycroft Holmes15-Apr-08 22:11
professionalMycroft Holmes15-Apr-08 22:11 
GeneralRe: Exception has been thrown by the target of an invocation Pin
tom8316-Apr-08 3:01
tom8316-Apr-08 3:01 
QuestionSatellite Assemblies... Pin
kaizenIT15-Apr-08 10:15
kaizenIT15-Apr-08 10:15 
GeneralRe: Satellite Assemblies... Pin
Dave Kreskowiak16-Apr-08 3:16
mveDave Kreskowiak16-Apr-08 3:16 
Generaltabs in form Pin
asha_s15-Apr-08 9:23
asha_s15-Apr-08 9:23 
GeneralRe: tabs in form Pin
C1AllenS15-Apr-08 10:39
C1AllenS15-Apr-08 10:39 
GeneralRe: tabs in form Pin
asha_s16-Apr-08 1:27
asha_s16-Apr-08 1:27 
GeneralMultiplying Numbers in Listbox Pin
msapril15-Apr-08 9:05
msapril15-Apr-08 9:05 
GeneralRe: Multiplying Numbers in Listbox Pin
Chinners15-Apr-08 23:59
Chinners15-Apr-08 23:59 
QuestionVB 2005 MaskedTextBox bound to MS-Access table Pin
David Mujica15-Apr-08 8:48
David Mujica15-Apr-08 8:48 
GeneralRe: VB 2005 MaskedTextBox bound to MS-Access table Pin
Dave Kreskowiak15-Apr-08 16:09
mveDave Kreskowiak15-Apr-08 16:09 
GeneralRe: working now, thanks Pin
David Mujica17-Apr-08 10:52
David Mujica17-Apr-08 10:52 

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.