Hi ,
i have a sql query with a where condition
like this where customername=@customername
For the @customername parameter , i want to provide multiple values so i change the code
to
where customername in (@customername)...and enabled the multivalue property to true in the report parameters property
but when i choose mutiple vlaues from my customer name drop down , the report is throwing an error...
'An repression of non-Boolean type specified in a context where condition is expected near ',''
Can someone guide me on how to do this...
i have a sql query with a where condition
like this where customername=@customername
For the @customername parameter , i want to provide multiple values so i change the code
to
where customername in (@customername)...and enabled the multivalue property to true in the report parameters property
but when i choose mutiple vlaues from my customer name drop down , the report is throwing an error...
'An repression of non-Boolean type specified in a context where condition is expected near ',''
Can someone guide me on how to do this...
4 Answers, 1 is accepted
0
Hi Ravi,
This is a generic sql error and not thrown by the reporting engine. Please run your query in SQL Server Management Studio with a preset number of values (i.e. simulating multivalues selected) and see whether it works. You can also review the culprits that others getting this error have hit and see if you can pinpoint yours.
All the best,
Steve
the Telerik team
This is a generic sql error and not thrown by the reporting engine. Please run your query in SQL Server Management Studio with a preset number of values (i.e. simulating multivalues selected) and see whether it works. You can also review the culprits that others getting this error have hit and see if you can pinpoint yours.
All the best,
Steve
the Telerik team
BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >
0

Ravi
Top achievements
Rank 1
answered on 31 Jul 2012, 03:48 PM
Hi Steve
This the query i ran against on the SQL server
declare
@cust varchar(30),
@v varchar(40)
set @cust = null
set @v ='john,James'
select * from Customers
where (Cust_ID =@cust or @cust is null)
and ( customername in (@v) or @v is null)
and it runs just fine
but when i get the query in to the report datsource and allot the parameters through telerik report and make the customername parameter as multivalue..I am still geeting the error...It works when i select only one value but for two it gives me the error ... Can you please enlighten me on this please...
Note : when i put the condition like this and (( customername in (@v) ) it works fine but i need the 'or' condition there .
for time being ...I am using the aggregate function to get all the values of the field selected by default in the drop down which acts as or condition for the query..but i would like to see if this gets resolved..
Thank you
This the query i ran against on the SQL server
declare
@cust varchar(30),
@v varchar(40)
set @cust = null
set @v ='john,James'
select * from Customers
where (Cust_ID =@cust or @cust is null)
and ( customername in (@v) or @v is null)
and it runs just fine
but when i get the query in to the report datsource and allot the parameters through telerik report and make the customername parameter as multivalue..I am still geeting the error...It works when i select only one value but for two it gives me the error ... Can you please enlighten me on this please...
Note : when i put the condition like this and (( customername in (@v) ) it works fine but i need the 'or' condition there .
for time being ...I am using the aggregate function to get all the values of the field selected by default in the drop down which acts as or condition for the query..but i would like to see if this gets resolved..
Thank you
0
Accepted
Hi Ravi,
I've attached a sample report how to modify your sql query and datasource parameter in order to handle such scenario. Give it a spin and let us know how it goes.
Greetings,
Steve
the Telerik team
I've attached a sample report how to modify your sql query and datasource parameter in order to handle such scenario. Give it a spin and let us know how it goes.
Greetings,
Steve
the Telerik team
BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >
0

Ravi
Top achievements
Rank 1
answered on 03 Aug 2012, 07:03 PM
Thanks Steve for your patient replies..Appreciate it..The above approach is good for me.