Results 1 to 3 of 3

Thread: how to change datareport sgl in code

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2002
    Location
    Finland, south area
    Posts
    29

    how to change datareport sgl in code

    I know that with this code I can change the SQL statement behind command, but I don't know where to place it.

    DataEnvironment.Commands("Companies").CommandText = "SELECT Name, State FROM Companies WHERE State =' " & Text1.Text & " ' "

    I have tried many procedures, for instance: DataEnvironment_Initialize(), DataReport_Initialize() etc. but any of them don't work.

    I have tested my datareport and it works just fine so all the settings are right.

    So if any of you know how to do this then please inform me, I would appreciated it a lot. Thanks.



  2. #2
    Member
    Join Date
    May 2002
    Posts
    34
    I think you should put that in the form, where you call to the report to show
    like

    report.commands blablabla

    report.show

    just a line before you show it

  3. #3
    Member
    Join Date
    May 2002
    Posts
    34
    sorry i mean dataenviroment.commands blablabla

    I think this is the right place because im doingsomething like

    dataenviroment.commandofthereport parameter, parameter
    report.show

    the parameters afeccts directly to the sql expression

    hope i explain fine and this helps

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