By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,851 Members | 1,074 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,851 IT Pros & Developers. It's quick & easy.

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

P: n/a
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(discrete value);

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

Nov 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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).ApplyCu rrentValues(values);

HTH

Elton Wang
el********@hotmail.com
"dr****@ortc.com" 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(discrete value);

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

Nov 19 '05 #2

P: n/a
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

Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.