Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2004
    Posts
    7

    Unanswered: How to make default value dropdown list for a parameter with CR10 JRC?

    Hi there,

    I am trying to make a default value dropdown list for a parameter with CR10 JRC (in JSP on Tomcat) when it opens a report template file. Thus the user can chose one value for the parameter. I have the code below in my JSP:

    ……
    Fields fldParamSet = new Fields();
    ParameterField prfOneParam = ParameterField();
    ParameterField fldDefaultValue = new ParameterField();

    fldDefaultValue.setName (“MyParam”);

    Values valDefValueSet = new Values();
    ParameterFieldDiscreteValue parmValue = new ParameterFieldDiscreteValue();

    parmValue.setValue("1");
    valDefValueSet.add(parmValue);

    parmValue.setValue("2");
    valDefValueSet.add(parmValue);

    parmValue.setValue("3");
    valDefValueSet.add(parmValue);

    fldDefaultValue.setDefaultValues(valDefValueSet);
    prfOneParam.setBrowseField(fldDefaultValue);

    fldParamSet.add (prfOneParam);

    CrystalReportViewer crvViewer = new CrystalReportViewer(); crvViewer.setParameterFields(fldParamSet);
    ……

    The JRC works fine. However, there is no dropdown list shown up. Could anyone here tell me what’s wrong with or what’s missing in my code?

    Any idea would be greatly appreciated!

    Jay

  2. #2
    Join Date
    Apr 2006
    Posts
    1
    hi,all
    i have the same problem
    but i want setvalues of parameter from its field from database
    i search for solutions
    if any one can help me,i will thankful for him

Posting Permissions

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