Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 28687

Using rs.exe to deliver reports does not connect to my shared datasource

$
0
0

Following some advice on here, I created a .bat file that uses rs.exe and an rss file to deliver my reports to our Production Report Server. This delivers the reports OK but leaves them detached from the shared Datasource. All my reports use the same shared datasource so if I deploy using Visual Studio, I get a message that the Datasource was not replaced because I didn't specify that option in the deploy.

However, when I deliver the report using the batch file and rs.exe, I get a message "The data set 'xxx' refers to the shared data source 'yyyy', which is not publsihed on the report server. Well it is because I can see it there and all my other reports are using it fine. If I try and run the report, it fails because it is not attached to a Datasource. However, I can link that report to that datasource (the one the error message says is not published there) and it then runs fine. If I subsequently redeploy the report using the same .bat file, I get the same error message but now the report runs OK - presumably because I have manually associated it with that Datasource.

This is my RSS file:

Dim definition As [Byte]() = NothingDim warnings As Warning() = NothingPublicSub Main()TryDim stream As FileStream = File.OpenRead(sourcePath + "\" + reportName + ".rdl")
definition = New [Byte](stream.Length) {}
stream.Read(definition, 0, CInt(stream.Length))
warnings = rs.CreateReport(reportName, targetFolder, True, definition, Nothing)IfNot (warnings IsNothing) ThenDim warning As WarningForEach warning In warnings
Console.WriteLine(warning.Message)Next warningElse
Console.WriteLine("Report: {0} published successfully with no warnings", reportName)EndIfCatch e As IOException
Console.WriteLine(e.Message)EndTryEndSub

And this is how I invoke rs.exe in my .bat file:

SET targetFolder=/Operational
SET sourcePath=\\DC1VTSTSV025\D$\Development\INGIS\Reporting\Main\Reports\Customer Care KPIs
SET reportName=Policy Release Times
rs.exe -i "\\DC1VTSTSV025\D$\Development\INGIS\Reporting\Main\Scripts\Batch Files\INGISRSS.rss"-s http://%INGISSQLServer%/ReportServer -v sourcePATH="%sourcePath%"-v targetFolder="%targetFolder%"-v reportName="%reportName%"
SET reportName=App Summary Received Times
rs.exe -i "\\DC1VTSTSV025\D$\Development\INGIS\Reporting\Main\Scripts\Batch Files\INGISRSS.rss"-s http://%INGISSQLServer%/ReportServer -v sourcePATH="%sourcePath%"-v targetFolder="%targetFolder%"-v reportName="%reportName%"
Can anyone tell me what I'm missing?

Viewing all articles
Browse latest Browse all 28687


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>