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

Invalid value of report parameter...

8 Answers 288 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Rajashree
Top achievements
Rank 1
Rajashree asked on 05 Feb 2014, 05:56 AM
Getting the following error when report is rendered.. Once refreshed, error disappers...

8 Answers, 1 is accepted

Sort by
0
Rajashree
Top achievements
Rank 1
answered on 05 Feb 2014, 05:57 AM
My querry is.. Why this error occurs?? Whats the reason behing this error?
0
Squall
Top achievements
Rank 1
answered on 07 Feb 2014, 09:02 AM
How do you set the report parameter value? Do you set it in code?
0
Rajashree
Top achievements
Rank 1
answered on 07 Feb 2014, 09:46 AM
Nope. I dont set the value. But have used need data source to bind data source to report. And I not set the value even programatically. I just want to know why this error occurs..
0
Hinata
Top achievements
Rank 1
answered on 11 Feb 2014, 02:51 PM
Hello Rajashree

It is hard to tell from your description what is actually going on. If you share more information on your setup like your code and more screenshots maybe someone here will be able to help.
0
Rajashree
Top achievements
Rank 1
answered on 12 Feb 2014, 05:57 AM
Hi Hardik,

I have added a screenshot of the error I get. I have not set any hardcoded values for the parameters. There are two parameters which are DateTime type. Once I open the report through report viewer I get this error displayed. Then if I refresh the report the error disappears and the report is working.. I want to know what is the cause of this error?? Why this error appears?? And What to doto avoid this??

Regards.
0
Hinata
Top achievements
Rank 1
answered on 14 Feb 2014, 01:59 PM
Hi Rajashree,

I think the parameter doesn't have a value when the report is loaded, so this is why you get an error.
Try giving a default value for the startDate report parameter. You can do that in the report parameter property Value.
Also try setting the AllowNull and AllowBlank properties to True.
0
Chris
Top achievements
Rank 1
Veteran
Iron
Iron
answered on 18 Jan 2016, 03:44 AM
HI

Invalid value of report parameter '...'.

There have some validation rules for report parameter :

Report Parameters
http://docs.telerik.com/reporting/designing-reports-parameters
(See 'Report Parameter Validation' section)

The document is perfect but sometimes users may be still confused by the error message.

So I think Telerik Reporting should enhance the validation message (more clearly) 
and help users easy to debugging.

Invalid value of report parameter '...', so what's the real reason ?
type is not match ? value is null ? or other reasons.
Telerik Reporting should tell the real reason to users 
and not the users spend so much time to find the reason by themself.

example :

App#1 Formal application
App#2 Little testing application

--

App#2

  In testing application the NeedDataSource event handler was linked at constructor :

    public C1Report1()
    {
      ...
      InitializeComponent();
      ...


      this.NeedDataSource += C1Report1_NeedDataSource;

    }

    ...

    private void C1Report1_NeedDataSource(object sender, EventArgs e)
    {
      ...

      this.DataSource = ...;
    }

App#1

  After testing application is ok and copy/paste the code of NeedDataSource event handler
  (C1Report1_NeedDataSource) to formal application :

    public C1Report1()
    {
      ...
      InitializeComponent();
      ...

    }

    ...

    private void C1Report1_NeedDataSource(object sender, EventArgs e)
    {
      ...

      this.DataSource = ...;
    }

  Note : event linking this.NeedDataSource += ... was forgotten.

When I run the App#1 and the error 'Invalid value of report parameter ...' was occurred
because I forgot the event linking (this.NeedDataSource += ...).

This is just a simple example, if the Telerik Reporting show the error 
'Invalid value of report parameter ..., the DataSource property was not set.', etc.
and not just 'Invalid value of report parameter ...',
I could check the code and find the reason quickly then solve the problem, 
and will not spend so much time to find the reason that cause the error.

Best regards

Chris
0
Nasko
Telerik team
answered on 19 Jan 2016, 01:53 PM
Hello Chris,

Thank you for the provided feedback. Actually, we have an item logged in our system for improvement of the report parameters error messages in a future version of the product.

Regards,
Nasko
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Rajashree
Top achievements
Rank 1
Answers by
Rajashree
Top achievements
Rank 1
Squall
Top achievements
Rank 1
Hinata
Top achievements
Rank 1
Chris
Top achievements
Rank 1
Veteran
Iron
Iron
Nasko
Telerik team
Share this question
or