Remove this line:
rpt.Database.Tables.Dispose();
You are setting the report to a dataset:
RPT2.SetDataSource(ds);
So Database.Tables is not in play at all. If you want to dispose of the data, you's be closing and disposing the dataset, not Database.Tables.
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter