Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing XML file datasource location in VB.NET

Status
Not open for further replies.

crisedefoie

Programmer
Feb 19, 2003
39
CA
HI

I created a Crystal Report which datasource is a XML file.
This file will be created and destroyed so I have to specify the location of the XML filewith each treatment.

There is my code :

lTblReport = Report.Database.Tables
For i = 0 To lTblReport.Count - 1
Report.Database.Tables(lTblReport.Item(i).Name).Location _
= CurDir() & "\" & XMLFileName
Next

Report.ReportSource = CReportName
etc...

There is the error message I got when it met the instructions in the FOR statement :

Error in 'ReportName'
Incorrect key number

I tought that's a very easy way to change file location but ... Where did I go wrong?

Thank you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top