Invalid value of parameter 'xxx' error

13 posts, 2 answers
  1. Richard Guo
    Richard Guo avatar
    17 posts
    Member since:
    Nov 2009

    Posted 03 Jun 2010 Link to this post

    Invalid value of parameter 'ClassName'. 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'.

    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

  2. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 07 Jun 2010 Link to this post

    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.
  3. DevCraft banner
  4. Richard Guo
    Richard Guo avatar
    17 posts
    Member since:
    Nov 2009

    Posted 07 Jun 2010 Link to this post

    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
  5. Answer
    Chavdar
    Admin
    Chavdar avatar
    898 posts

    Posted 08 Jun 2010 Link to this post

    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.
  6. Richard Guo
    Richard Guo avatar
    17 posts
    Member since:
    Nov 2009

    Posted 08 Jun 2010 Link to this post

    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
  7. Answer
    Steve
    Admin
    Steve avatar
    10941 posts

    Posted 08 Jun 2010 Link to this post

    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.
  8. Richard Guo
    Richard Guo avatar
    17 posts
    Member since:
    Nov 2009

    Posted 08 Jun 2010 Link to this post

    Thank you very much Steve.
  9. Samuel Santiago
    Samuel Santiago avatar
    3 posts
    Member since:
    May 2009

    Posted 07 Sep 2010 Link to this post

    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
    
  10. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 09 Sep 2010 Link to this post

    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
  11. Andreas Selling
    Andreas Selling avatar
    20 posts
    Member since:
    May 2009

    Posted 16 Oct 2010 Link to this post

    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
  12. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 19 Oct 2010 Link to this post

    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
  13. Andreas Selling
    Andreas Selling avatar
    20 posts
    Member since:
    May 2009

    Posted 25 Oct 2010 Link to this post

    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.
  14. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 26 Oct 2010 Link to this post

    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
Back to Top
DevCraft banner