Results 1 to 2 of 2

Thread: problems passing sql statements to data reports

  1. #1
    Guest
    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 ?

  2. #2
    Addicted Member
    Join Date
    Oct 1999
    Posts
    253
    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!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width