Dim ds2 As New DataSet ds2.Tables.Add(MyBO.CurrentDataTable)
I use the above statements in conjunction with XrtraReports to print one of my reports. I run the same code again and MyBO.CurrentdataTable may be the same or it may be a different table (This depends on User Selection). If it is a different table the above code works again but if it is the same table I get an error stating the currenttable already belongs to the dataset. Is there some way around this?
I have tried using ds2=nothing but that does not help.
Is there a way to find out if ds2 exists?
Is there a way to find out if MyBO.currentdatatable belongs to ds2?
Is there a way to remove all the tables in ds2?
I know I can use ds2.tables.remove(MyBo.CurrentDatatable).
Thanks in Advance.