ThanksA good practice is to test the query in the appropiate enviroment. Then when you successfully retrieve the data put into report.
Try to print parameters in the report.
Be carefull with case sensitive of your database, mine is case sensitive.|||Hello ykagoma.
I've made several reports that need a situation similar tou the one you're handling. What I do is to create a more awful query, so it is composed by IF statements. I mean, IF the parameter has certain value I use a query with certain WHERE clauses. IF the parameter has another value then I use a query with another WHERE clauses and so on.
For example:
IF @.param = -5
BEGIN
SELECT *
FROM tbl_employee
END
ELSE
BEGIN
SELECT *
FROM tbl_employee
WHERE id_boss = @.param
END
I hope it helps.|||
Hi,
the solustion is actually in help books of Reporting Services.
For example you have query: select name from emplyees where name like 'ro%'
and You want to have parameter instead ro%. The modified query into Visual Studio type into by having parameter @.NAME is:
="select name from emplyees where name like '" & Parameters!NAME.Value & "%'"
so you are not writing query directly but puzzling query text by syntax usage of visual studio, which can include everything.
No comments:
Post a Comment