PDA

Click to See Complete Forum and Search --> : problems passing sql statements to data reports


Mar 20th, 2000, 05:18 PM
Hi,

I am using the following line of code to pass parameters to reports.

dtaEnvSample.Commands("com").CommandText= "select.....

There are 4 command buttons for the different reports on the screen with different SQL statements behind each. My problem is that as soon as I run the first one it seems that every one I run after it is recieving the same SQL code. Is there any way of 'refreshing' the command text ?

Forest Dragon
Mar 23rd, 2000, 09:12 PM
I suggest creating a different Command object to each SQL statement. Then, whenever the user clicks on one of the CommandButtons, change the DataMember property of the report to the appropriate Command object and print the report.

Good Luck!!!