reporting services - Passing a variable as a parameter to an ssrs report -


i trying pass variable classic asp page ssrs. when put in literal value parameter, such 296, works fine. want put in variable sent url works in different ways different people logged in. so, instead of url http://servername.net/reportserver....rs:command=render&agency=296 (for agency number 296) want use variable have set agency of person has logged in. let's variable pagency. have tried agency=" @pagency (i set pagency = logged in person's agency) , sorts of other combinations, , have searched web, find no answer this. i've tried session variables but, no go. must able but...

thanks can give. cheers!

that not how rest uri works knowledge. need build string , present first formed, not define variable on it. somthing in code (using html form base)

in example below there 4 clear things understand:

a. 'action' in form must webservice location of report , post self. (or can iframe element potentialy have not messed much)

b. 'input' element text based must match id , name name of parameter passing in.

c. 'select' element gives user 'option's of save methods output directly common types.

d. 'input' type of 'submit' ensure form post data prescribed.

<!doctype html> <html>     <head>         <title>ssrs tester</title>     </head>     <body>         <form id="ssrsrender" action="http:// (reportservername)/reportserver?/(pathtoreport)" method="post" target="_self">             <h3>enter detail report render</h3>             variable 'test': <input type="text" id="test" name="test">             <br/>             outputs:             <select id="rs:format" name="rs:format" size=1>                 <option value="html4.0">html 4</option>                 <option value="image">tiff image</option>                 <option value="pdf">pdf</option>             </select>             <br/>             <input type="submit" value="render report">         </form>     </body> </html> 

if want more types of input variables dynamically ssrs render want outside of ssrs landing page need determine if want use:

  1. the service front end scripting javascript html
  2. something more easy control pre built tools 'report viewer' asp.net or client application in c# or vb.net
  3. create service proxy in class library , calls in code directly formatting

trying create rest uri programatically better done contacting service , using built in methods imho rather trying make string. may little more of learning curve in end.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -