March 26, 2007 at 7:40 am
when ever i deploy a report i have to do the following:
update Visual Source Safe (Get latest version)
update Visual Studio .RDL file list (Get latest version)
then change the connection properties to point to the
proper Reporting Server.
then find the .rdl file in the list (Right click - deploy)
THERE HAS GOT TO BE AN EASIER WAY TO DO THIS.
what i would like to do is simply deploy the report without
fooling with Visual Studio. i never edit the report, or
make any adjustments to it what so ever. i simply 'deploy'
it so there is no need for Visual Studio.
is there another way to deploy a report??
_________________________
March 26, 2007 at 11:38 am
You can script deploy them using RSS via RS.exe.
There is a sample installed with samples with a file name PublishSampleReports.rss
Here is an example of what I do to publish Report1.rdl and Report2.rdl to a folder named "My Reports" on the report server. Note: You could make it generic or build a GUI tool to do the job better this just works for my specific needs. Hopefully this helps thou.
Batch File
rs -i "D:\ReportsPush\PublishReports.rss" -s http://localhost/reportserver -b -v parentFolder="My Reports"
Altered RSS file
'=====================================================================
' File: PublishReports.rss
'
' Summary: Script that can be used with RS.exe to publish the
' reports that ship with Reporting Services.
'
'---------------------------------------------------------------------
' Based on the sample PublishSampleReports.rss from Microsoft
'
' Copyright (C) Microsoft Corporation. All rights reserved.
'
' This source code is intended only as a supplement to Microsoft
' Development Tools and/or on-line documentation. See these other
' materials for detailed information regarding Microsoft code samples.
'
' THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
' KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
' IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
' PARTICULAR PURPOSE.
'=====================================================================*/
Dim definition As [Byte]() = Nothing
Dim warnings As Warning() = Nothing
Dim parentPath As String = "/" + parentFolder
Dim filePath As String = "D:\ReportsPush\Reports\"
Public Sub Main()
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
Dim name As String
'Publish the reports
PublishReport("Report1")
PublishReport("Report2")
End Sub
Public Sub PublishReport(ByVal reportName As String)
Try
Dim stream As FileStream = File.OpenRead(filePath + reportName + ".rdl")
definition = New [Byte](stream.Length) {}
stream.Read(definition, 0, CInt(stream.Length))
stream.Close()
Catch e As IOException
Console.WriteLine(e.Message)
End Try
Try
warnings = rs.CreateReport(reportName, parentPath, True, definition, Nothing)
If Not (warnings Is Nothing) Then
Dim warning As Warning
For Each warning In warnings
Console.WriteLine(warning.Message)
Next warning
Else
Console.WriteLine("Report: {0} published successfully with no warnings", reportName)
End If
Catch e As Exception
Console.WriteLine(e.Message)
End Try
End Sub
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply