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

am i in the right place

Status
Not open for further replies.

kingduck

MIS
Oct 31, 2002
41
EG
Hi All;
This is my first Report. I have created a blank report and set the data source to a dataset but i do not how to add fields to the report.
I am using this code

Dim MyDataset As New DataSet()
Dim cnAccess As New OleDbConnection()
Dim SqlStr As String
sqlstr = "Select * from Customer"

cnAccess = New OleDbConnection("ConnectionString")
cnAccess.Open()

Dim cmdselect As New OleDbCommand(SqlCommand, cnAccess)
Dim damf As New OleDbDataAdapter(cmdselect)
damf.Fill(MyDataset, "custs")

dim tmp as new reportdocument()
tmp.Load("customers.rpt")
tmp.SetDataSource(MyDataset)

All This code works and doesn't produce an error.
I added only textobjects. But not fields
How can i add fields from the DataSet to the report?

Thanks in advance

 
Where is this code located? Inside the report? It looks like you have some sort of VB application with this in it...? .NET?

Typically, the report datasource (ADO, ODBC, etc.) is set with the "Database Expert" within Crystal.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top