' File: Test.rss
Dim format as string = "Excel"
Dim fileName as String = "C:\Export2.xls "
Dim reportPath as String = "/TimeByEmployee"
Public Sub Main()
' 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 = "ms-excel"
Dim warnings() AS Warning = Nothing
Dim reportHistoryPa rameters() As ParameterValue = Nothing
Dim streamIDs() as string = Nothing
rs.Credentials = System.Net.Cred entialCache.Def aultCredentials
Dim parameters(3) As ParameterValue
parameters(0) = New ParameterValue( )
parameters(0).N ame = "Employee"
parameters(0).V alue = " "
parameters(1) = New ParameterValue( )
parameters(1).N ame = "Department s"
parameters(1).V alue = " "
parameters(2) = New ParameterValue( )
parameters(2).N ame = "Week Number"
parameters(2).V alue = WeekNumber
results = rs.Render(repor tPath, format, _
Nothing, Nothing, parameters, _
Nothing, Nothing, encoding, mimeType, _
reportHistoryPa rameters, warnings, streamIDs)
' Open a file stream and write out the report
Dim stream As FileStream = File.OpenWrite( fileName)
stream.Write(re sults, 0, results.Length)
stream.Close()
End Sub
'End of script
here is how i run it
rs -i RunReport.rss -s http://localhost/reportserver -v WeekNumber=90 -e mgmt2000
this is the error i get:
The value of parameter 'Parameters' is not valid. also how can i cgange this line to pdf
Dim mimeType as string = "ms-excel" i tried this but it did not
work
Dim mimeType as string = "ms-pdf"
Thanks
Dim format as string = "Excel"
Dim fileName as String = "C:\Export2.xls "
Dim reportPath as String = "/TimeByEmployee"
Public Sub Main()
' 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 = "ms-excel"
Dim warnings() AS Warning = Nothing
Dim reportHistoryPa rameters() As ParameterValue = Nothing
Dim streamIDs() as string = Nothing
rs.Credentials = System.Net.Cred entialCache.Def aultCredentials
Dim parameters(3) As ParameterValue
parameters(0) = New ParameterValue( )
parameters(0).N ame = "Employee"
parameters(0).V alue = " "
parameters(1) = New ParameterValue( )
parameters(1).N ame = "Department s"
parameters(1).V alue = " "
parameters(2) = New ParameterValue( )
parameters(2).N ame = "Week Number"
parameters(2).V alue = WeekNumber
results = rs.Render(repor tPath, format, _
Nothing, Nothing, parameters, _
Nothing, Nothing, encoding, mimeType, _
reportHistoryPa rameters, warnings, streamIDs)
' Open a file stream and write out the report
Dim stream As FileStream = File.OpenWrite( fileName)
stream.Write(re sults, 0, results.Length)
stream.Close()
End Sub
'End of script
here is how i run it
rs -i RunReport.rss -s http://localhost/reportserver -v WeekNumber=90 -e mgmt2000
this is the error i get:
The value of parameter 'Parameters' is not valid. also how can i cgange this line to pdf
Dim mimeType as string = "ms-excel" i tried this but it did not
work
Dim mimeType as string = "ms-pdf"
Thanks
Comment