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

Report Parameters

3 Answers 65 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ricardo
Top achievements
Rank 1
Ricardo asked on 17 Apr 2013, 06:21 PM
Hello Guys, 

How I can to make my query to receive a parameter using '%like%'?

I tried this 3 options below but its dont working ( last(5ยช) line )

SELECT PSR.NOME, CO.NOME, FU.NOME, CO.ATIVO,CO.ID_PSR
FROM COLABORADOR CO
LEFT OUTER JOIN PSR ON PSR.ID_PSR = CO.ID_PSR
LEFT OUTER JOIN FUNCAO FU ON FU.ID_FUNCAO = CO.ID_FUNCAO
WHERE PSR.NOME LIKE %@Nome_PSR%

SELECT PSR.NOME, CO.NOME, FU.NOME, CO.ATIVO,CO.ID_PSR
FROM COLABORADOR CO
LEFT OUTER JOIN PSR ON PSR.ID_PSR = CO.ID_PSR
LEFT OUTER JOIN FUNCAO FU ON FU.ID_FUNCAO = CO.ID_FUNCAO
WHERE PSR.NOME LIKE '%@Nome_PSR%'

SELECT PSR.NOME, CO.NOME, FU.NOME, CO.ATIVO,CO.ID_PSR
FROM COLABORADOR CO
LEFT OUTER JOIN PSR ON PSR.ID_PSR = CO.ID_PSR
LEFT OUTER JOIN FUNCAO FU ON FU.ID_FUNCAO = CO.ID_FUNCAO
WHERE PSR.NOME LIKE @Nome_PSR


Follow in attachment

3 Answers, 1 is accepted

Sort by
0
IvanY
Telerik team
answered on 22 Apr 2013, 03:32 PM
Hello Ricardo,

Up to your question - you can easily achieve your task by writing LIKE '%' + @Nome_PSR + '%'.

I hope that helps.

All the best,
IvanY
the Telerik team

Have you tried the new visualization options in Telerik Reporting Q1 2013? You can get them from your account.

0
Ricardo
Top achievements
Rank 1
answered on 22 Apr 2013, 04:50 PM
Hi Iva,n!

Thanks for your Help!
I've a parameter in my report filled with all stores registered in a table. I need configure this field to the query bring the results if the user select only one store, and a option "ALL", the report search for all stores, do you know how can I do this?

I cant find where configure the dropdown to receive the value ALL

Rgrds, 
0
IvanY
Telerik team
answered on 23 Apr 2013, 01:45 PM
Hello Ricardo,

Since all locations can be combined you need multivalue parameter, which has the select all option and also will give your users the possibility to select more than one value for the parameter.

Greetings,
IvanY
the Telerik team

Have you tried the new visualization options in Telerik Reporting Q1 2013? You can get them from your account.

Tags
General Discussions
Asked by
Ricardo
Top achievements
Rank 1
Answers by
IvanY
Telerik team
Ricardo
Top achievements
Rank 1
Share this question
or