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

Adding Fields to report

Status
Not open for further replies.

kingduck

MIS
Oct 31, 2002
41
EG
Hi All;
I am new to .NET. 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


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top