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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting the Datasource with a file path

Status
Not open for further replies.

RPrinceton

Programmer
Jan 8, 2003
86
US
Hi All,
I am using Crystal Reports 8.5 and VB6. I want to report on an ascii file that will located in several different locations on the hard drive. I am able to get the ODBC set up and the report defined. It appears that the SetDataSource property is where Crystal Reports will look for the file, however it also appears that it wants a recordset object not a file path. How do I get the ascii text file into the form of a recordset object so Crystal can use it? I see terms like ADO, DAO and RDO but they all seem to work with relational tables and not ascii files, or, is there another property where I can just supply the file path?
Please advise.
Thx in advance.
Regards,
RPrinceton

Code snippet:
Dim Appl As New CRAXDRT.Application
Dim Report As New CRAXDRT.Report
Set Report = Appl.OpenReport("d:\Report3.rpt")
CRViewer.Database.SetDataSource rsObj <-- object not a file path
CRViewer1.ReportSource = Report
CRViewer1.ViewReport
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top