Data Report Problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • darrel
    New Member
    • Nov 2006
    • 72

    Data Report Problem

    Question: How can i add runtime parameter using DATA REPORT in vb6?
    For example: i want to show the record of a specific customer
    personal information only.

    e.g.
    "SELECT * FROM CustomerInfo WHERE CustomerName = ' " & txtName.text & " ' "


    Any ideas will be a great help for my system... Thank you...
  • muddasirmunir
    Contributor
    • Jan 2007
    • 284

    #2
    you can done it by closing the current recordset and then open
    it by using your deisired query in the initialized evnet of the datareport.



    Originally posted by darrel
    Question: How can i add runtime parameter using DATA REPORT in vb6?
    For example: i want to show the record of a specific customer
    personal information only.

    e.g.
    "SELECT * FROM CustomerInfo WHERE CustomerName = ' " & txtName.text & " ' "


    Any ideas will be a great help for my system... Thank you...

    Comment

    • QVeen72
      Recognized Expert Top Contributor
      • Oct 2006
      • 1445

      #3
      Hi,

      Add a Parameter for your command Text say :

      "SELECT * FROM CustomerInfo WHERE CustomerName = ? "

      And before Showing the report, Pass the parameter:
      DataEnvironment 1.Command1 txtName.text

      If it dosent work try this :
      DataEnvironment 1.Command1 "'" & txtName.text & "'"


      Regards
      Veena

      Comment

      Working...