Results 1 to 3 of 3

Thread: Passing Values from the Form to the Report

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2005
    Posts
    95

    Passing Values from the Form to the Report

    I just want to display the name of the user who logged in the VB.NET (version 2002) application onto my crystal report(v 9).ie How can I pass the loginID from the Login Form so as to be displayed onto the crystal report???
    Thanks

  2. #2
    Lively Member
    Join Date
    Nov 2006
    Posts
    116

    Re: Passing Values from the Form to the Report

    VB Code:
    1. Dim paramFields As New ParameterFields
    2.             Dim paramField As New ParameterField
    3.             Dim discreteVal As New ParameterDiscreteValue
    4.             paramField.ParameterFieldName = "userID"
    5.             discreteVal.Value = userID
    6.             paramField.CurrentValues.Add(discreteVal)
    7.             paramFields.Add(paramField)
    8.  
    9.             <Your CR View Object>.ParameterFieldInfo = paramFields

  3. #3
    Addicted Member mabbas110's Avatar
    Join Date
    Oct 2005
    Location
    Karachi , Pakistan
    Posts
    172

    Re: Passing Values from the Form to the Report

    Make a forumula field in ur report and pass the value to that report from ur form, simply read msdn for this.

    you find many good examples.
    Thanks and Regards,

    Muhammad Abbas

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