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

SetDataSource not setting data source in .NET/CR

Status
Not open for further replies.

olichap

Programmer
Mar 20, 2001
389
US
I've a report that was constructed using an existing XML schema file. At runtime I am trying to pass my populated dataset to the report (7 tables in all).

I've tried using:

rptPrn.setdatasource(dataset.tables)

also tried:

rptPrn.setdatasource(dataset)

also tried:

rptPrn.Database.Tables.Item(0).SetDataSource(dsEDI.Tables(0))
rptPrn.Database.Tables.Item(1).SetDataSource(dsEDI.Tables(1))
rptPrn.Database.Tables.Item(2).setDataSource(dsEDI.Tables(2))
rptPrn.Database.Tables.Item(3).SetDataSource(dsEDI.Tables(3))
rptPrn.Database.Tables.Item(4).SetDataSource(dsEDI.Tables(4))
rptPrn.Database.Tables.Item(5).SetDataSource(dsEDI.Tables(5))
rptPrn.Database.Tables.Item(6).SetDataSource(dsEDI.Tables(6))

When the report prints it is blank and one page; should be 30 pages. Have I not implemented SetDataSource proplerly?

Thanks,

Oli
 
The examples I have seen look like your second example. Do the tables have the same names in the data set as in the report?

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Expert's Guide to Formulas / Tips and Tricks / Guide to Crystal in VB
- tek@kenhamady.com
 
Yes, all 7 have the same structure. I've also linked them the same way in CR as they are Related in the DataSet.

Thanks,

O.
 
Actually I was asking if the tables have the same TABLE names in both places, not if they have the same structure.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Expert's Guide to Formulas / Tips and Tricks / Guide to Crystal in VB
- tek@kenhamady.com
 
Sorry, wasn't specific enough. Yes, table names are the same in the XSD and VB DataSet; structures all the same.

Thanks,

O.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top