Note that there are some explanatory texts on larger screens.

plurals
  1. POReporting Services - Changing a report parameter property
    primarykey
    data
    text
    <p>I'm using a RDCE for my reports on the report server. In order for my reports to work I have to set the "UsedInQuery" parameter to true, where it is false on default. However this is not a parameter that can be set during design time. One has to manually configure the parameter after it is deployed.</p> <p>One why to do this is to manipluate the report server database directory by first finding the reports:</p> <pre><code>select ItemID ,Path,Name,Description ,cast(Property as xml) as Property ,cast(Parameter as xml) as Parameter from dbo.Catalog where name like 'list of databases%' </code></pre> <p>And then updating the report parameter with the changed parameter value </p> <pre><code>update Catalog set Parameter=' &lt;Parameters&gt; &lt;UserProfileState&gt;0&lt;/UserProfileState&gt; &lt;Parameter&gt; ... &lt;UsedInQuery&gt;True&lt;/UsedInQuery&gt; ... &lt;/Parameter&gt; &lt;/Parameters&gt;' where ItemID='someID' </code></pre> <p>Now this all great and all that it works, but having to manipulate the database like that everytime is just not good. Therefore I'm looking at what the web service of reporting services can do. </p> <p>My question is, is it possible to change the report paramater any other way than by manipulating the database directly? Preferably by the web service provided from Reporting Services.</p> <p>What I have found was that this method comes close to what I want: </p> <pre><code>SetItemParameters(path, parameters) </code></pre> <p><a href="http://msdn.microsoft.com/en-us/library/reportservice2010.reportingservice2010.setitemparameters.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/reportservice2010.reportingservice2010.setitemparameters.aspx</a></p> <p>Basically the above method does what I need if I can set the <em>UsedInQuery</em> paramter. But when trying to change a parameter through the above line will result in nothing being changed at all. I'm not sure what I'm doing wrong here.</p> <p>Here is part of my code, keep in mind it is in Borland C++:</p> <pre><code> NS_ReportService2010::ItemParameter *itemPar = new NS_ReportService2010::ItemParameter(); itemPar-&gt;Name = "language"; itemPar-&gt;QueryParameter = System::True; // itemPar-&gt;AllowBlank = true; NS_ReportService2010::ArrayOfItemParameter *itemParameters = new NS_ReportService2010::ArrayOfItemParameter(); itemParameters-&gt;set_length(1); itemParameters-&gt;operator [](0) = itemPar; ReportingService-&gt;SetItemParameters("/myreport", *itemParameters); </code></pre> <p>Am I doing anything wrong in my update?</p> <p><strong>EDIT:</strong> </p> <p>After the reply of Ron5504 I looked into the log file and got this:</p> <pre><code>runningrequests!ReportServer_0-2!6b4!07/30/2013-13:57:39:: v VERBOSE: SoapAction: "http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/SetItemParameters" library!ReportServer_0-2!6b4!07/30/2013-13:57:39:: v VERBOSE: Constructed Stream Factory 'StreamFactory:19aa4462-dc7a-4a19-a505-1d0a96ce7fc4' of type 'Microsoft.ReportingServices.Library.MemoryThenFileStreamFactory' library!ReportServer_0-2!6b4!07/30/2013-13:57:39:: i INFO: Call to GetItemTypeAction(/TestReport). library!ReportServer_0-2!6b4!07/30/2013-13:57:39:: i INFO: Call to GetItemTypeAction completed. Returns 2. library!ReportServer_0-2!6b4!07/30/2013-13:57:39:: i INFO: Call to SetReportParametersAction(/TestReport). library!ReportServer_0-2!6b4!07/30/2013-13:57:39:: v VERBOSE: Transaction begin. library!ReportServer_0-2!6b4!07/30/2013-13:57:39:: i INFO: Call to SetReportParametersAction completed. library!ReportServer_0-2!6b4!07/30/2013-13:57:39:: v VERBOSE: Transaction commit. rshost!rshost!6b4!07/30/2013-13:57:39:: v VERBOSE: HttpPipelineCallback::EndOfRequest(): continue pipeline=0x00000002781A5AF0. rshost!rshost!b5c!07/30/2013-13:57:39:: v VERBOSE: ThreadContinuePipeline: processing request on pipeline=0x00000002781A5AF0, state=2, IOError=0, node=0. rshost!rshost!828!07/30/2013-13:57:43:: v VERBOSE: HttpPipeline::DisconnectCallback: releasing pipeline=0x00000002781A5AF0. rshost!rshost!b5c!07/30/2013-13:57:43:: v VERBOSE: ThreadContinuePipeline: processing request on pipeline=0x00000002781A5AF0, state=0, IOError=2250, node=0. rshost!rshost!b5c!07/30/2013-13:57:43:: v VERBOSE: State machine disconnected pipeline=0x00000002781A5AF0, state=4 ... rshost!rshost!b5c!07/30/2013-13:57:43:: v VERBOSE: HttpPipeline::DoStateDisconnected: releasing pipeline=0x00000002781A5AF0. rshost!rshost!b5c!07/30/2013-13:57:43:: v VERBOSE: HttpPipeline::ReleaseOnce: releasing pipeline=0x00000002781A5AF0. rshost!rshost!b5c!07/30/2013-13:57:43:: v VERBOSE: Destroying pipeline=0x00000002781A5AF0, callback=0x0000000278138720 ... library!WindowsService_0!224!07/30/2013-13:57:46:: v VERBOSE: Starting database version check timer. library!WindowsService_0!224!07/30/2013-13:57:46:: v VERBOSE: Verifying DB version. library!WindowsService_0!224!07/30/2013-13:57:46:: v VERBOSE: Database version check timer executed. library!WindowsService_0!122c!07/30/2013-13:58:46:: v VERBOSE: Starting database version check timer. library!WindowsService_0!122c!07/30/2013-13:58:46:: v VERBOSE: Verifying DB version. library!WindowsService_0!122c!07/30/2013-13:58:46:: v VERBOSE: Database version check timer executed. </code></pre> <p>Furthermore I'd like to add that I found how to do it in the designer mode. By going to the <em>Advanced</em> tab of the report parameter. Then you put "Refresh data when the parameter changes:" to "<em>Always refresh</em>". Nevertheless, my question still stands, I want to know if it is possible through the SetItemParameters method. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload