I would like to build the query on my code behind and send it as is
not to send params and use a build query on the R.S
Can i do it? how can i do it?
Hi,what do you mean by "build query" ? If you just want to open a report you can go with the URL Access syntax which can be found in the BOL.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de|||
I Mean that i build my quey on run time
the user picks something and by that i decide which query to build
this is the reason i want to send the whole query and not only params
p.s
i use sql 2000 not 2005
|||Hi,
you would probably use a procedure then to redirect the flow to a specifc query.
HTH, jens Suessmeyer.
http://www.sqlserver2005.de
|||Reporting Services 2000 allows the usage of an expression-based command text. However, keep in mind that once you use an expression you can no longer directly execute the query in the query designer. I recommend to first build the expression in a report textbox and try it with various parameter combinations to visually verify the generated queries are correct and then as a last step replace the original command text with an expression, such as
="select a, b from table1"
Also make sure that if you use string concatenation to build your query based on parameter values, you have to very careful to prevent SQL injection attacks in your query.
Alternatively to an expression-based command text, you could use a parameterized query to avoid the risk of SQL injections (e.g. select a, b from table1 where country = @.Country)
-- Robert
No comments:
Post a Comment