Crystal Reports Error: "Missing parameter field current value."

Discussion in 'ASP .Net' started by drisso@ortc.com, Jul 19, 2005.

  1. Guest

    Hello,

    I have searched that error on these message boards, msdn and
    crystaldecisions.com. I found tutorials that showed how to export a
    crystal report to pdf, but like many others I am getting an error when
    I actually do the oRpt.Export() command. The error is "Missing
    parameter field current value." I looked this error up on
    crystaldecisions.com and they had a patch which I downloaded, installed
    and rebooted the machine, but still same error. I set the parameters
    and report in the Page Load method. I set the export options in the
    Button event. I have a print button that will sets all the export
    options and calls export, etc. I even tried adding a value right
    before oRpt.Export() is called. I wrote this line before oRpt.Export()

    this.oRpt.ParameterName.CurrentValues.Add(discretevalue);

    discrete value has a value with string "None" so I know there is a
    value there, but it still errors out. Please can someone tell me why
    this always comes up and a way around it? Since you can't print with
    crystal report 9 directly in web forms I need to use this.

    Thanks,

    David
    , Jul 19, 2005
    #1
    1. Advertising

  2. Hi David,

    Try following code to assign parameter to CR report:

    ParameterDiscreteValue discretevalue = new ParameterDiscreteValue();
    discretevalue.Value = objValue; // Assign parameter
    ParameterValues values = new ParameterValues();
    values.Add(discretevalue);
    crReport.DataDefinition.ParameterFields(i).ApplyCurrentValues(values);

    HTH

    Elton Wang



    "" wrote:

    > Hello,
    >
    > I have searched that error on these message boards, msdn and
    > crystaldecisions.com. I found tutorials that showed how to export a
    > crystal report to pdf, but like many others I am getting an error when
    > I actually do the oRpt.Export() command. The error is "Missing
    > parameter field current value." I looked this error up on
    > crystaldecisions.com and they had a patch which I downloaded, installed
    > and rebooted the machine, but still same error. I set the parameters
    > and report in the Page Load method. I set the export options in the
    > Button event. I have a print button that will sets all the export
    > options and calls export, etc. I even tried adding a value right
    > before oRpt.Export() is called. I wrote this line before oRpt.Export()
    >
    > this.oRpt.ParameterName.CurrentValues.Add(discretevalue);
    >
    > discrete value has a value with string "None" so I know there is a
    > value there, but it still errors out. Please can someone tell me why
    > this always comes up and a way around it? Since you can't print with
    > crystal report 9 directly in web forms I need to use this.
    >
    > Thanks,
    >
    > David
    >
    >
    =?Utf-8?B?RWx0b24gVw==?=, Jul 19, 2005
    #2
    1. Advertising

  3. Guest

    Thanks,

    I used that code in the button event handler right before oRpt.Export()
    was called and it worked. I believe the function
    ApplyCurrentValues(values) is what makes the difference.


    Thanks again,

    David
    , Jul 19, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. David McAmis \(Crystal Certified Consultant\)

    Re: "Missing parameter field current value" with CR.NET

    David McAmis \(Crystal Certified Consultant\), Jul 16, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    583
    David McAmis \(Crystal Certified Consultant\)
    Jul 16, 2003
  2. Tbean
    Replies:
    0
    Views:
    671
    Tbean
    May 18, 2004
  3. Peri
    Replies:
    1
    Views:
    2,952
    =?Utf-8?B?Um90aGFyaWdlcg==?=
    Jul 21, 2005
  4. Replies:
    2
    Views:
    865
  5. Rod
    Replies:
    2
    Views:
    1,781
Loading...

Share This Page