MVC report viewer parameters refresh issue

6 posts, 1 answers
  1. Nicholas
    Nicholas avatar
    10 posts
    Member since:
    Oct 2014

    Posted 17 Apr 2015 Link to this post

    1)Create a .trdx file that requires one or more parameters / report won't run without specifying a parameter

    2) Load that trdx file into the CSharp.MvcDemo sample that ships with Telerik Reporting

     3) You get a clunky error message:

    Error creating report instance (Report = XXX.trdx):
    Missing or invalid parameter value. Please input valid data for all parameters

    4) You input the report parameters

    5) The user thinks the preview button will make the report refresh, but it does not.  You have to hit the circle refresh button on the upper left to actually get the report.

    Item 5. This seems like there has to be something gone awry here.  The preview button does not seem to actually do anything.  The clunky error message in item 3 seems bizarre as well.  How do I change that to something more sane?

    Seems like I have to be missing something.  Seems like a straight forward use case to have people input report parameters before running the report.  Can I get some feedback / help?

  2. Nasko
    Admin
    Nasko avatar
    1045 posts

    Posted 21 Apr 2015 Link to this post

    Hello Nicholas,

    We followed the steps to reproduce the issue, but to no avail. Please check this video for reference. In order to investigate further we will need a runnable sample project exhibiting the issue.

    Regarding the missing or invalid parameter values error message, currently it is not editable. You can set the parameters' AllowNull property to True, and handle the null value in the report e.g., show only a single report section with a user-friendly message.

    We consider providing a mechanism for editing the message in future releases. For the time being, please use the suggested approach.

    Regards,
    Nasko
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
  3. Nicholas
    Nicholas avatar
    10 posts
    Member since:
    Oct 2014

    Posted 21 Apr 2015 in reply to Nasko Link to this post

    The issue appears to be with a multi-select drop down.  If the multi-select is entered last even if you click somewhere else on the screen the preview button never highlights:

    http://screencast.com/t/eHPrikTT

     

    When you have more then one parameter also, when you enter the first parameter and click on the second one the preview button is disabled and then when you enter the last parameter you need to click somewhere else to make the preview button highlight:

     

    http://screencast.com/t/34bAIkHsP

  4. Nasko
    Admin
    Nasko avatar
    1045 posts

    Posted 23 Apr 2015 Link to this post

    Hello Nicholas,

    The Preivew button is never disabled when we test the HTML5 viewer locally under Chrome/Internet Explorer/Firefox. Please check this video demonstrating the default behavior.
    Please make sure that the application does not contain styles which interfere with the viewer's behavior.
    You can also update Google Chrome to the latest version.

    In case the issue persists, please open a new support ticket in our system and attach a runnable sample project exhibiting the problematic behavior.

    Regards,
    Nasko
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
  5. Answer
    Nicholas
    Nicholas avatar
    10 posts
    Member since:
    Oct 2014

    Posted 23 Apr 2015 in reply to Nasko Link to this post

    I narrowed down the issue further.  I am using a hidden parameter to send multi-select values to a stored procedure based on the drop down list.  If I simply set the hidden parameter to allow null / blank to true it resolves the issue.

     I hate weird issues like this.  I would send you an example report put I'd need to open a ticket apparently to attach.

    If you add a hidden parameter with value = Join(",", Parameters.Test.Value)  Where Test is another multi-select value and Allow Blank / Null are true, it will reproduce the issue.  You can mark this issue as solved.

  6. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 27 Apr 2015 Link to this post

    Hi Nicholas,

    Thank you for your update.

    If there parameters are dependant on each other, and one of them can accept a Null value, the other one should also handle the case where the first parameter is Null. Thus your solution to set the dependent parameters AllowNull to true is the right way to go.

    Other approach I can suggest you is to handle the first parameter's Null value in the expression e.g.:
    = Join(",", IsNull(Parameters.Test.Value,Array('')))
    Multivalue parameters evaluate to array of objects, also to conform to the expected type of arguments we use the Array utility function.

    Regards,
    Stef
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
Back to Top