none
Invoking Web Service With Complex Parameters From SSRS Report RRS feed

  • Question

  • I have a web service that I am using as a data source in an SSRS 2005 report. I set up the data source, and then set up the data set and everything works fine when I have web methods that have simple input parameter types... When I have complex types (such as an array of integers) I can't seem to get the parameter to pass.

    For example, 

    <Query>
     <SoapAction>http://asdf/GetDelinquentBillList </SoapAction>
      <Method Name="GetDelinquentBillList" Namespace="http://asdf/"/> 
      <Parameters>
        <Parameter Name="billID" Type="Int32"></Parameter> 
       </Parameters>
     <ElementPath />
    </Query>

    works fine for invoking a method with a simple integer parameter.

    However, if the parameter is a "multi-valued" integer report parameter, I can't figure out how to pass it to the web service (which accepts an array of integers as an input parameter).

    I've looked around and can't seem to find any documentation on the <Query> schema or what my options are. I've tried dumb things like Type="Int32[]" and things like this, but I'm really just swinging wildly in the dark. In all cases, the parameter seems to just not pass to the web service method.

    Is there any documentation or hints that would be helpful on how to accomplish this?

    Thanks in advance...
    Wednesday, October 1, 2008 8:23 PM

All replies

  • Hi Michael,

     

    You can use ReportingService2005.SetReportParameters method to set the parameter values to the report. If the type of the multi-value parameter is integer, pass an array of string to the method.

     

    Code Snippet

    Dim a(2) As String

    a(0) = 1
    a(1) = 2


    Dim ReportName as String 
    ReportName="customer report"
    Dim rp(0) As ReportParameter
    rp(0) = New ReportParameter("billID", a)
    rs.SetReportParameters (ReportName, rp)

     

    If there are any more questions, please let me know.

    Thanks.

    Tuesday, October 7, 2008 8:41 AM
    Moderator
  • I think that you misunderstand my problem. You seem to me to be describing the answer to "how would I invoke a report that took an integer array as a parameter from a separate program using the reporting services web service API". My question relates to something totally different... How do you, from inside of a report, invoke a custom web service and use the results as a dataset for the report when the web service takes an integer array as an input parameter.

     

    Thanks,

    Michael

     

     

    Tuesday, October 7, 2008 2:00 PM