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

MVC report viewer parameters refresh issue

5 Answers 175 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Nicholas
Top achievements
Rank 1
Nicholas asked on 17 Apr 2015, 10:02 PM

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?

5 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 21 Apr 2015, 11:56 AM
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.

 
0
Nicholas
Top achievements
Rank 1
answered on 21 Apr 2015, 01:29 PM

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

0
Nasko
Telerik team
answered on 23 Apr 2015, 02:24 PM
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.

 
0
Accepted
Nicholas
Top achievements
Rank 1
answered on 23 Apr 2015, 03:15 PM

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.

0
Stef
Telerik team
answered on 27 Apr 2015, 07:31 AM
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.

 
Tags
General Discussions
Asked by
Nicholas
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Nicholas
Top achievements
Rank 1
Stef
Telerik team
Share this question
or