Results 1 to 2 of 2

Thread: get the value of textbox and pass to crystal report using vb6

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2011
    Posts
    3

    Red face get the value of textbox and pass to crystal report using vb6

    hi guys,

    how to get the value from textbox or any other control and use it in crystal reports in vb6 by clicking a button?

    the value of the textbox will be used in a sql statement like "Select *from Users Where Username = '" & me.textbox.text & "'" to filter the report. the report will only show the filtered records.

    this report will be displayed in crystal report viewer.

    please answer asap, thanks and God Bless! Smile | :

  2. #2
    Member
    Join Date
    Sep 2005
    Posts
    44

    Re: get the value of textbox and pass to crystal report using vb6

    Your not stating what version of Crystal your using but usually you'll need to create a parameter field in the Crystal report called something like @FilterParameter. You then need to edit the RecordFilter Selection in Crystal to account for a value (if any) in the newly created @FilterParameter field.

    Then in VB6 code, you access the report, loop through the parameter fields until you find @FilterParameter and assign the value of the textbox to it and then allow the report to show.

    Hope that helps.

    Barry

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