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

Report parameters

1 Answer 244 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ashoo Sharda
Top achievements
Rank 1
Ashoo Sharda asked on 01 Jul 2010, 03:56 PM
I am creating a report which has a multivalue parameter user. It gets all the users from the database. The report also uses a query directly similar to "select col1, col2, col3
from table1
where (col1 in (@user)) and .....

When I run this report with the user parameter set to Multivalue I get the following error

An error has occured while processing Report:
Failed to convert parameter value from a Object[] to a String.
---------------InnerException---------------------------
Object must implement IConvertible

The report runs fine if the @user is not set to multivalue. The type on @user is a string.

Please advise.
Thanks for your time in advance

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 02 Jul 2010, 03:53 PM
Hello Ashoo Sharda,

Currently the new DataSource Components don't work out of the box with a MultiValue Report Parameter. In order to use a multivalue Parameter you will have to create User Function that bulds a String from multivalue Parameter (Object[]) and use that string to set a SqlDataSource SelectCommand in the NeedDataSource event. Check out the attached sample project that illustrates how this scenario can be accomplished.

Kind regards, Peter
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
Tags
General Discussions
Asked by
Ashoo Sharda
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or