Hi,

I wonder if someone can help me with a problem. I'm trying to use the Web
Service in Microsoft Reporting Services to generate a report to PDF on a
file share. I'm using server side vbscript (or jscript) to do this, and
using Microsoft Soap Toolkit 3.0 to access the Web Service. I have made a
start on the vbscript (see below), and have an RSS scripting batch file to
work from to build the rest of the script. Most of this batch file script
looks straightforward to convert.

However my problem is more to do with knowing how to make soap calls, in
particular to create a variable of a datatype that (I'm assuming) is not
available on the client but on the server where RS is installed. In this
case I need to create variables of type ParameterValue in the vbscript, as
shown in the RSS file.

How do I do this? With some sort of soap call?
e.g. is it along the lines of:

dim parameters (2) = rs.CreateParameterDataTypes()
.
.
results = rs.Render(reportPath, format, historyID, deviceInfo, parameters,
Nothing, Nothing, encoding, mimeType, nothing, warnings, streamIDs)


Would really appreciate some help.
Thanks
Greg


--------------------
vbscript as it exisits
---------------------
Option Explicit
Dim rs, items, item

Set rs = CreateObject("MSSOAP.SoapClient30")
CALL
rs.MSSoapInit("http://sv01/ReportServer/ReportService.asmx?wsdl","","","")
rs.Credentials = System.Net.CredentialCache.DefaultCredentials

--------------------------------------------------------------------------------------------
RSS scripting batch file - values inn upper case are global strings passed
into the script
--------------------------------------------------------------------------------------------
'#### Example Values of Variables
' Dim format as string = "PDF"
' Dim fileName as String = "C:\Reportd\yyyy.pdf"
' Dim reportPath as String = "/CNSOfficeSystem/Quote"

'#### Create and initialise variables
Dim ParamSplitStr as string = ","
' Typically FILEFORMAT is "PDF"
Dim format as string = FILEFORMAT
Dim fileName as String = OUTPUTFILE
Dim reportPath as String = RPATH
Dim ReportParamNames() as String =
REPORTPARAMETERNAMES.Split(ParamSplitStr)
Dim ReportParamValues() as String =
REPORTPARAMETERVALUES.Split(ParamSplitStr)

'#### Prepare Render arguments
Dim historyID as string = Nothing
Dim deviceInfo as string = Nothing
Dim showHide as string = Nothing
Dim results() as Byte
Dim encoding as string
Dim mimeType as string
Dim warnings() AS Warning = Nothing
Dim reportHistoryParameters() As ParameterValue = Nothing
Dim streamIDs() as string = Nothing

'#### Report Parameters into Array
Dim parameters(ReportParamNames.GetUpperBound(0)) As ParameterValue
For idx As Integer = 0 To ReportParamNames.GetUpperBound(0)
parameters(idx) = New ParameterValue()
parameters(idx).Name = ReportParamNames(idx)
parameters(idx).Value = ReportParamValues(idx)
Next idx

'#### Render Report
results = rs.Render(reportPath, format, historyID, deviceInfo, parameters,
Nothing, Nothing, encoding, mimeType, reportHistoryParameters, warnings,
streamIDs)

'#### Open a file stream and write out the report
Dim stream As FileStream = File.OpenWrite(filename)
stream.Write(results, 0, results.Length)
stream.Close()