This is a migrated thread and some comments may be shown as answers.

Invalid value of parameter 'xxx' error

12 Answers 512 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Richard Guo
Top achievements
Rank 1
Richard Guo asked on 03 Jun 2010, 07:53 PM
Hi there,

I am using the web report viewer. My report has one parameter called 'ClassName' which is added to the report by code. The data source of this parameter is from a query. if the data source is an empty collection, the report viewer shows '<select a value>' in the parameter combo box which is fine. If I click the Preview button it shows 'Please input data for all parameters' which is also fine. However, whenever I click the refresh button or click the Export button(after selecting a format) on the viewer tool bar, I will get the following error:

Invalid value of parameter 'ClassName'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Exception: Invalid value of parameter 'ClassName'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[Exception: Invalid value of parameter 'ClassName'.]

[CancelProcessingException: An error has occured while processing the report. Processing canceled. Check the InnerException for more information.]
   Telerik.Reporting.Processing.Report.ProcessItem() +339
   Telerik.Reporting.Processing.ReportItemBase.Process(DataMember data) +315
   Telerik.Reporting.Processing.ReportProcessor.ProcessReport(IReportDocument reportDocument, IDictionary processingContext) +563
   Telerik.Reporting.Processing.ReportProcessor.RenderReport(String format, IReportDocument reportDocument, Hashtable deviceInfo, Hashtable renderingContext, CreateStream createStreamCallback) +456
   Telerik.ReportViewer.WebForms.ServerReport.Render(HttpResponse response, String format, Int32 pageIndex) +815
   Telerik.ReportViewer.WebForms.ReportPageOperation.PerformOperation(NameValueCollection urlQuery, HttpContext context) +244
   Telerik.ReportViewer.WebForms.HttpHandler.ProcessRequest(HttpContext context) +297
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75


Is there a way to handle this error? It should show 'Please input data for all parameters'.
Please help.

Thanks,
Richard

12 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 07 Jun 2010, 02:47 PM
Hello Richard Guo,

This is hardly a real life scenario, as users require specific info to be displayed and exported and for that they have to select a parameter value. If a parameter is not selected, a warning sign is shown to hint you that a value should be selected as well as the error message: "Please input data for all parameters". Under what circumstances would you continue and try to export after this point?

Greetings,
Steve
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Richard Guo
Top achievements
Rank 1
answered on 07 Jun 2010, 05:29 PM
Hi Steve,

Thanks for the reply.
I understand that the chance for this problem to happen is very samll, but I cannot prevent the user/tester from clicking the refresh button or the export button. The user/tester would consider it as a defect.
This error is out of my control. Please provide a workaround if there is one.

Thanks,
Richard
0
Accepted
Chavdar
Telerik team
answered on 08 Jun 2010, 09:23 AM
Hi Richard Guo,

Currently there is no way to avoid this behavior. A possible workaround would be to set the AllowNull property of the report parameter to true if the AvailableValues are an empty collection. In this case the report will be rendered with some default values.

Hope this helps.

Sincerely yours,
Chavdar
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Richard Guo
Top achievements
Rank 1
answered on 08 Jun 2010, 05:33 PM
Hi Chavdar,

Thanks for your suggestion.
I did try the AllowNull property but I think it would confuse the user. Do you guys have a plan for fixing this behavior?

Regards,
Richard
0
Accepted
Steve
Telerik team
answered on 08 Jun 2010, 05:45 PM
Hi Richard,

Yes, we have logged this issue in our system and would address it for subsequent version of the product. Your Telerik points have been updated for bringing this to our attention.

Sincerely yours,
Steve
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Richard Guo
Top achievements
Rank 1
answered on 08 Jun 2010, 05:47 PM
Thank you very much Steve.
0
Samuel Santiago
Top achievements
Rank 1
answered on 07 Sep 2010, 08:49 PM
I would like to add my vote to have this issue examined.  Users are attempted to Export an empty report that has a parameter and they have not selected a value for this parameter or run the report prior to attempting the Export.  Don't ask my why they would do this, but they do.  There doesn't seem a way to capture this exception or verify input prior to the attempted export.  Here's the stack we see:

Invalid value of parameter 'GroupPlanID'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Exception: Invalid value of parameter 'GroupPlanID'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[Exception: Invalid value of parameter 'GroupPlanID'.]

[CancelProcessingException: An error has occurred while processing the report. Processing canceled. Check the InnerException for more information.]
   Telerik.Reporting.Processing.Report.ProcessItem() +345
   Telerik.Reporting.Processing.ReportItemBase.Process(DataMember data) +325
   Telerik.Reporting.Processing.ReportProcessor.ProcessReport(IReportDocument reportDocument, IDictionary processingContext) +602
   Telerik.Reporting.Processing.ReportProcessor.RenderReport(String format, IReportDocument reportDocument, Hashtable deviceInfo, Hashtable renderingContext, CreateStream createStreamCallback) +456
   Telerik.ReportViewer.WebForms.ServerReport.Render(HttpResponse response, String format, Int32 pageIndex) +819
   Telerik.ReportViewer.WebForms.ReportExportOperation.PerformOperation(NameValueCollection urlQuery, HttpContext context) +114
   Telerik.ReportViewer.WebForms.HttpHandler.ProcessRequest(HttpContext context) +326
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
0
Steve
Telerik team
answered on 09 Sep 2010, 01:02 PM
Hello Samuel,

Thank you for your vote. The issue is in our bug tracking system and would be addressed in upcoming versions.

Sincerely yours,
Steve
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Andreas Selling
Top achievements
Rank 2
answered on 16 Oct 2010, 07:44 PM
I can also say that this is a pretty big problem.
We have about 50 to 100 persons logged in all the time in our system where about 20% percent of these people can use the reports.

We get about 1-2 errormessages per day in our log on this.

/Andreas
0
Steve
Telerik team
answered on 19 Oct 2010, 04:00 PM
Hi guys,

This problem has already been addressed in the Q2 SP1 release, namely "ReportViewer toolbar is not disabled when there is an invalid parameter value."

Greetings,
Steve
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Andreas Selling
Top achievements
Rank 2
answered on 25 Oct 2010, 07:27 PM
Hello

I think this is stil a bug. The Export link is disabled but if you change the value in the dropdownlist for export format. The export link switches to active even if not all parameters are correct.

This is causing about 1-2 error logs per day for us.
0
Steve
Telerik team
answered on 26 Oct 2010, 09:15 AM
Hi Andreas,

As stated in my previous reply, the problem is fixed in the Q2 SP1 release (v. 4.1.10.921). Make sure you're using that version and you've upgraded properly.

Sincerely yours,
Steve
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Richard Guo
Top achievements
Rank 1
Answers by
Steve
Telerik team
Richard Guo
Top achievements
Rank 1
Chavdar
Telerik team
Samuel Santiago
Top achievements
Rank 1
Andreas Selling
Top achievements
Rank 2
Share this question
or