*RESOLVED*--textbox.text value to parameter field-VBForums
Results 1 to 2 of 2

Thread: *RESOLVED*--textbox.text value to parameter field

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2002
    Location
    India
    Posts
    37

    *RESOLVED*--textbox.text value to parameter field

    hi
    i want to change the value of a parameter field in crystal report according to the value of a textbox in VB.
    i tried using crt.ParameterFields(0)=txtbox.text.
    but i get errors like "this property is not set properly".
    please somebody let me know how i cudd solve this problem.
    thanks
    kavimegam
    Last edited by kavimegam; Jul 2nd, 2003 at 06:15 AM.

  2. #2
    Addicted Member
    Join Date
    Oct 2002
    Posts
    174
    I think this may help u


    Description

    Changes the default value of the specified parameter field. When the prompting dialog box appears for the parameter field, the value you specify with this property is the value you are prompted with.

    Usage

    [form.]Report.ParameterFields(ArrayIndex)[=ParameterName;
    NewValue;SetCurrentValue]

    Remarks

    n The parameter, SetCurrentValue can either be set to TRUE or FALSE.

    n If set to TRUE, the parameter value is passed to the current value in the report; the user is not prompted to enter the parameter value.

    n If set to FALSE, the parameter value is passed to the default value for the parameter; the user is prompted to enter the parameter value, with the value you set showing as the default value.

    n The default value for SetCurrentValue is FALSE.

    n This property does not eliminate the prompt by specifying a current value for the parameter field. You will still be prompted but the default value in the prompt will be the value you specify.

    n Use a separate line of code for each parameter field for which you want to change the value.

    n The order of values in the array must conform to the order of parameter fields in the report.

    n The first parameter field in the report is array index (0), the second is (1), etc.

    n For example, to change the value of the first parameter field in a report (parameter1) to red use the following syntax (user will not be prompted to enter a value):

    CrystalReport1.ParameterFields(0) = parameter1;red;TRUE

    n Or, to prompt the user to change the value of the third parameter field in a report (parameter3) use the following syntax (user will be prompted to use the default value set using the NewValue parameter below - blue):

    CrystalReport1.ParameterFields(2) = parameter3;blue;FALSE

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.