Click here to Skip to main content
15,039,359 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

I have a VB .Net script that programmatically creates an SSRS subscription.

I am looking to find out how I can set the SSRS report "timeout" parameter programmatically is possible?

The script I have created so far....

Dim DeliveryExtensionSettings As New ExtensionSettings()
Dim DeliveryExtensionParams(7) As ParameterValue

''Providing values for File Devliery Extension parameters
DeliveryExtensionParams(0) = New ParameterValue()
DeliveryExtensionParams(0).Name = "PATH"
DeliveryExtensionParams(0).Value = pUNC_OutputFilePath

DeliveryExtensionParams(1) = New ParameterValue()
DeliveryExtensionParams(1).Name = "FILENAME"
DeliveryExtensionParams(1).Value = pOutputFileName + "_@Timestamp"

DeliveryExtensionParams(2) = New ParameterValue()
DeliveryExtensionParams(2).Name = "FILEEXTN"
DeliveryExtensionParams(2).Value = "True"

DeliveryExtensionParams(3) = New ParameterValue()
DeliveryExtensionParams(3).Name = "RENDER_FORMAT"
DeliveryExtensionParams(3).Value = "CSV (No Header)"

DeliveryExtensionParams(4) = New ParameterValue()
DeliveryExtensionParams(4).Name = "WRITEMODE"
DeliveryExtensionParams(4).Value = "AutoIncrement"

DeliveryExtensionParams(5) = New ParameterValue()
DeliveryExtensionParams(5).Name = "USERNAME"
DeliveryExtensionParams(5).Value = FileShareAccessUserName

DeliveryExtensionParams(6) = New ParameterValue()
DeliveryExtensionParams(6).Name = "PASSWORD"
DeliveryExtensionParams(6).Value = FileShareAccessPassword

DeliveryExtensionSettings.ParameterValues = DeliveryExtensionParams
DeliveryExtensionSettings.Extension = "Report Server FileShare"

If Not (DeliveryExtensionParams Is Nothing) Then
Dim extensionParam As ExtensionParameter
End If

Catch e As SoapException
End Try

Console.WriteLine("Creating subscription for " + pReportNameWithFolderPath)

rs.CreateSubscription(pReportNameWithFolderPath, DeliveryExtensionSettings, ReportDesc, "TimedSubscription", pSubscriptionScheduleXML, Nothing)

Console.WriteLine("Successfully created subscription for " + pReportNameWithFolderPath)
Catch e As Exception
End Try

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900