Click here to Skip to main content
15,849,306 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionRe: Regarding Windows Registry Pin
vijaylumar16-Apr-08 19:54
vijaylumar16-Apr-08 19:54 
GeneralRe: Regarding Windows Registry Pin
Dave Kreskowiak17-Apr-08 2:31
mveDave Kreskowiak17-Apr-08 2:31 
Questionregarding creating Help File for vb.net 2.0 windows application Pin
vijaylumar15-Apr-08 21:08
vijaylumar15-Apr-08 21:08 
AnswerRe: regarding creating Help File for vb.net 2.0 windows application Pin
Arjun Marwaha15-Apr-08 21:42
Arjun Marwaha15-Apr-08 21:42 
GeneralRe: regarding creating Help File for vb.net 2.0 windows application Pin
Smithers-Jones16-Apr-08 0:32
Smithers-Jones16-Apr-08 0:32 
GeneralCRAXDRT.ConnectionPropertiesClass.getItem(String Name) "Error: Invalid Index" Pin
vbDigger'z15-Apr-08 20:32
vbDigger'z15-Apr-08 20:32 
GeneralRe: CRAXDRT.ConnectionPropertiesClass.getItem(String Name) "Error: Invalid Index" Pin
_Damian S_15-Apr-08 20:59
professional_Damian S_15-Apr-08 20:59 
GeneralRe: CRAXDRT.ConnectionPropertiesClass.getItem(String Name) "Error: Invalid Index" Pin
vbDigger'z15-Apr-08 22:22
vbDigger'z15-Apr-08 22:22 
Note: The error occurs here
crxConnectionProperty = crxTable.ConnectionProperties("Data Source") = crxDataBasePath


Should this say crxDataBase, not crxDataBasePath?
*******

Yup!! actually i try it both...

<br />
public crxDataBasePath as string = "D:\folder1\folder2\Database"<br />
<br />
For Each crxTable In crxReport.Database.Tables<br />
                crxConnectionProperty = crxTable.ConnectionProperties("Data Source") = crxDataBasePath<br />
                crxConnectionProperty = crxTable.ConnectionProperties("Initial Catalog") = "dbEmployee.mdb"<br />
                crxConnectionProperty = crxTable.ConnectionProperties("User ID") = "myUserID"<br />
                crxConnectionProperty = crxTable.ConnectionProperties("Password") = "myPassword"<br />
            Next crxTable<br />


********

still the same error in that first line of,
crxConnectionProperty = crxTable.ConnectionProperties("Data Source") = crxDataBasePath
..

CRAXDRT.ConnectionPropertiesClass.getItem(String Name) "Error: Invalid Index"

*********

and also please you may double check my code..
here it is..
***************************

Public crxApp As CRAXDRT.Application
Public crxReport As CRAXDRT.Report
Public crxDataBase As CRAXDRT.Database
Public crxTable As CRAXDRT.DatabaseTable
Public crxTables As CRAXDRT.DatabaseTables
Public crxConnectionProperty As CRAXDRT.ConnectionProperty


Public strSelectionfrm As String
Public strCRSourcePath As String

<br />
Private Sub frmCrystalReport_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
        Try<br />
            ChildFormAutoSizeFit(Me)<br />
            Me.Cursor = Cursors.WaitCursor<br />
            Me.MdiParent = frmMain<br />
<br />
            crxApp = New CRAXDRT.Application<br />
<br />
            crxReport = crxApp.OpenReport(strCRSourcePath, CrystalDecisions.Shared.OpenReportMethod.OpenReportByDefault)<br />
<br />
            crxTables = crxReport.Database.Tables<br />
<br />
            For Each crxTable In crxReport.Database.Tables<br />
                crxConnectionProperty = crxTable.ConnectionProperties("Data Source") = crxDataBasePath<br />
                crxConnectionProperty = crxTable.ConnectionProperties("Initial Catalog") = "dbEmployee.mdb"<br />
                crxConnectionProperty = crxTable.ConnectionProperties("User ID") = "myUserIDxxxxxx"<br />
                crxConnectionProperty = crxTable.ConnectionProperties("Password") = "myPasswordxxxxx"<br />
            Next crxTable<br />
<br />
            crxReport.Database.Verify()<br />
<br />
            crxReport.RecordSelectionFormula = 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 />


***********
im so confused... please help... Frown | :(
GeneralRe: CRAXDRT.ConnectionPropertiesClass.getItem(String Name) "Error: Invalid Index" Pin
_Damian S_16-Apr-08 19:07
professional_Damian S_16-Apr-08 19:07 
GeneralRe: CRAXDRT.ConnectionPropertiesClass.getItem(String Name) "Error: Invalid Index" Pin
vbDigger'z16-Apr-08 22:56
vbDigger'z16-Apr-08 22:56 
GeneralRe: CRAXDRT.ConnectionPropertiesClass.getItem(String Name) "Error: Invalid Index" Pin
Mycroft Holmes15-Apr-08 23:07
professionalMycroft Holmes15-Apr-08 23:07 
GeneralRe: CRAXDRT.ConnectionPropertiesClass.getItem(String Name) "Error: Invalid Index" Pin
vbDigger'z15-Apr-08 23:19
vbDigger'z15-Apr-08 23:19 
GeneralRe: CRAXDRT.ConnectionPropertiesClass.getItem(String Name) "Error: Invalid Index" Pin
ChandraRam16-Apr-08 0:56
ChandraRam16-Apr-08 0:56 
GeneralRe: CRAXDRT.ConnectionPropertiesClass.getItem(String Name) "Error: Invalid Index" Pin
vbDigger'z16-Apr-08 15:21
vbDigger'z16-Apr-08 15:21 
GeneralRe: CRAXDRT.ConnectionPropertiesClass.getItem(String Name) "Error: Invalid Index" Pin
ChandraRam16-Apr-08 20:52
ChandraRam16-Apr-08 20:52 
GeneralRe: CRAXDRT.ConnectionPropertiesClass.getItem(String Name) "Error: Invalid Index" [modified] Pin
vbDigger'z16-Apr-08 22:53
vbDigger'z16-Apr-08 22:53 
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 19:04
vbDigger'z17-Apr-08 19:04 
Questionextract OLE Object from MS-Access Table using vb6 Pin
ERLN15-Apr-08 19:05
ERLN15-Apr-08 19:05 
GeneralRe: extract OLE Object from MS-Access Table using vb6 Pin
Dave Kreskowiak16-Apr-08 4:23
mveDave Kreskowiak16-Apr-08 4:23 
GeneralException has been thrown by the target of an invocation Pin
tom8315-Apr-08 18:56
tom8315-Apr-08 18:56 
GeneralRe: Exception has been thrown by the target of an invocation Pin
Arjun Marwaha15-Apr-08 21:50
Arjun Marwaha15-Apr-08 21:50 
GeneralRe: Exception has been thrown by the target of an invocation Pin
Mycroft Holmes15-Apr-08 23:11
professionalMycroft Holmes15-Apr-08 23:11 
GeneralRe: Exception has been thrown by the target of an invocation Pin
tom8316-Apr-08 4:01
tom8316-Apr-08 4:01 
QuestionSatellite Assemblies... Pin
kaizenIT15-Apr-08 11:15
kaizenIT15-Apr-08 11:15 
GeneralRe: Satellite Assemblies... Pin
Dave Kreskowiak16-Apr-08 4:16
mveDave Kreskowiak16-Apr-08 4:16 

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.