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

Using a dynamic ADO recordset as data source for a crystal report

Status
Not open for further replies.

Becca999

Programmer
Oct 14, 2003
23
0
0
US
Hello,

I have an ADO recordset that gets built dynamically:

Global grstReport as New ADODB.Recordset

Public CreateRecordset()
With grstReport
.Fields.Append "tmpLeftOrder", adSmallInt, , adFldIsNullable + adFldMayBeNull
.Fields.Append "tmpLeftSN1", adInteger, , adFldIsNullable + adFldMayBeNull
.Fields.Append "tmpLeftSN2", adInteger, , adFldIsNullable + adFldMayBeNull
.Fields.Append "tmpRightOrder", adSmallInt, , adFldIsNullable + adFldMayBeNull
.Fields.Append "tmpRightSN1", adInteger, , adFldIsNullable + adFldMayBeNull
.Fields.Append "tmpRightSN2", adInteger, , adFldIsNullable + adFldMayBeNull
.CursorType = adOpenKeyset
.LockType = adLockOptimistic
.Open
End With

End Sub

I need to used this recordset as the data for a Crystal Report. I set up the report using Database -> More Data Sources -> Active Data -> Field Definitions Only and created a Tab Separated Text file with the same field names as in the global recordset which is suppose to just be place holders.

Does anyone know the syntax for setting the recordset to the repotr from within the VB app?

Thanks!!
 
Thank you so much zemp!! I have been searching and this is exactly what I needed!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top