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

ReportParameters Collection Editor and Constants

3 Answers 163 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Paul Haines
Top achievements
Rank 1
Paul Haines asked on 14 Jul 2009, 02:57 PM
I've noticed that, when entering a parameter's value within this editor dialog, if you use the "Edit Expression" screen to generate the value's new text then it automatically puts an equals sign, '=', at the beginning of both the boolean constant values. This seems to cause the text to be treated as a string rather than as a boolean, and it gives you an "unable to convert string to a boolean" error, (or similar), as it's trying to parse the text "=True" into a boolean.
Removing the equals sign resolves the error, but as it took me a while to realise this I wanted to let everyone else know, and also to see if Telerik are aware of this.

Paul

3 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 17 Jul 2009, 11:24 AM
Hello Paul,

Actually it is the other way around - expression without equal sign are considered strings, although currently both our viewers try to be smart and figure out what you're trying to do, so currently (Q2 2009) setting True to a Boolean parameter with or without equal sign should be properly evaluated.

Best wishes,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Paul Haines
Top achievements
Rank 1
answered on 20 Jul 2009, 08:34 AM
I've created a ReportParameter of type 'boolean' and when I set its value to be "=True" then I get the following;

"An error has occured...Failed to convert parameter value from a String to a Boolean".

This might be because I'm referencing this report parameter in a number of "ConditionalFormatting" entries, although it's also being passed onto a SqlDataAdapter's parameters, (a stored procedure), so I don't know exactly where in the report this error is being caused from.

Paul
0
Steve
Telerik team
answered on 20 Jul 2009, 12:40 PM
Hi Paul Haines,

We've not been able to reproduce this locally. Are you using the latest version and if so, can you send us a sample report where the error can be replicated?

All the best,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
General Discussions
Asked by
Paul Haines
Top achievements
Rank 1
Answers by
Steve
Telerik team
Paul Haines
Top achievements
Rank 1
Share this question
or