开发者

How can you hide/unhide Reporting Services report parameters via URL query string?

开发者 https://www.devze.com 2023-01-15 05:27 出处:网络
I\'m trying to figure out how I can dynamically h开发者_JS百科ide/unhide parameters for a Reporting Services report I\'ve created via a URL query string. I\'ve tried reading a whole bunch of stuff I f

I'm trying to figure out how I can dynamically h开发者_JS百科ide/unhide parameters for a Reporting Services report I've created via a URL query string. I've tried reading a whole bunch of stuff I found through a Google search and I've also tried reading various MSDN documents regarding SQL Server, but I have yet to find a way how I can pull this off. Does anyone know how I can accomplish this? Thanks in advance.


Not sure if you still want this, but you'd use the &rc:Parameters=false setting in the URL

Edit: that hides/unhides the parameter block as you mentioned.

To set parameters you'd have something like &EmployeeID=1234&FieldID=43 in the URL

So you can set parameters and hide them

Edit2: you can only do this at design time. I forget the option, but you can have hidden parameters in the report parameter page that can be set via URL access or via Report manager


Well.. this just goes to show my lack of experience with SSRS. My URL was off (apparently you can't preview reports through the Report Manager in the manner I was trying to).

EDIT: Problem still not solved -- I'm now having problems hiding a single report parameter conditionally through a query string (yes I was testing off the wrong URL originally but now I have the right URL and I still have problems when it comes to conditionally hiding a single parameter). If anyone knows how to do this, please let me know!


(DISCLAIMER: May depend on the version of SSRS you're using, if you're using 2005 & up, you should be good, I believe)

This is possible, in the xml definition for the report, find the definition for the parameter, it should look something like this

<ReportParameter Name="YourParameterNameHere">
     <DataType>String</DataType>
     <Prompt>YourParameterNameHere</Prompt>
</ReportParameter>

And you can add this line to set hidden to true:

 <ReportParameter Name="YourParameterNameHere">
         <DataType>String</DataType>
         <Prompt>YourParameterNameHere</Prompt>
         <Hidden>true</Hidden>
    </ReportParameter>

Hope this solves your issue!

0

精彩评论

暂无评论...
验证码 换一张
取 消