Can someone help me i have a report screen where the user builds the select command for a DataAdapter based on the checkboxes the tick.
once they have chosen the info they want they press the preview button which runs the select command and fills a dataset. Then the datasource of the Datagrid is set to the dataset.
This works fine but if you want to run the report again say because the first one didn't have all data needed when the preview button is pressed again it clears the dataset (first i did this by rows.clear, columns.clear then i tried clearing the dataset with ("Tablename").clear and then finally i've tried re-creating the dataset via ds=new dataset and re doing the tables).
It runs the same function as before but instead of getting rid of the old data and displaying the new data it adds it'self on to the end so i have the old columns then the new columns next to it.
have tried everything i can think of can anyone help me???
i attach my code and forms.
Last edited by nokia8210; Feb 11th, 2004 at 10:44 AM.
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
I've just looked at my application and realised that is what I used, but I also had to set my data adaptor to nothing.
When I tried to use DataSource I had difficulties in getting the table to display the rows.
Last edited by taxes; Feb 11th, 2004 at 05:23 AM.
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
Thanks everyone i have it working now as i said before it didn't like having a datasource set to it so i got rid of the 'dgData.Datasource =' bit and bound the data to the dataset in the load event this has sorted out my problem.