Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSRS step template error - Cannot find LoadReportDefinition method #261

Closed
jeremyhoughton opened this issue Dec 1, 2015 · 6 comments
Closed

Comments

@jeremyhoughton
Copy link

Hi,

We have been trying to use the step template to deploy SSRS reports and shared datasets found here: https://library.octopusdeploy.com/#!/step-template/actiontemplate-deploy-ssrs-reports-from-a-package

One problem we are getting is that the following piece of code which is located in the Update-ReportParameters function is failing:

$ExecutionInfo = $ReportExecutionProxy.LoadReportDefinition($ReportData, [ref] $ReportExecutionWarnings);

For some reason it can't find the method LoadReportDefinition on the $ReportExecutionProxy object. We have stepped through it using Powershell ISE and the method doesn't even appear in the code autocomplete. Is there any work around for this or maybe a missing namespace?

@jeremyhoughton jeremyhoughton changed the title Deploy SSRS Reports from a package step template problem SSRS step template error - Cannot find LoadReportDefinition method Dec 1, 2015
@hnrkndrssn
Copy link
Contributor

@twerthi is this something you know how to solve quickly?

If not, I'll get an environment setup and figure out what's happening here.

@twerthi
Copy link
Contributor

twerthi commented Dec 3, 2015

What version of PowerShell are they using? What version of SQL Server Reporting Services?

Does the $ReportExecutionProxy have a value? What does $ReportExecutionProxy.GetType() return?

@jeremyhoughton
Copy link
Author

@twerthi please see the answers to your questions below. Please let me know if you need anymore information?

Powershell Version:
PSVersion 3.0
WSManStackVersion 3.0
SerializationVersion 1.1.0.1
CLRVersion 4.0.30319.18449
BuildVersion 6.2.9200.16628
PSCompatibleVersions {1.0, 2.0, 3.0}
PSRemotingProtocolVersion 2.2

SQL Server Reporting Services Version:
Microsoft SQL Server Reporting Services Version 11.0.3000.0

$ReportExecutionProxy:
Yes $ReportExecutionProxy has a value. In the template it is initiated like so:
$ReportExecutionProxy = New-WebServiceProxy -Uri $ReportExecutionUrl -UseDefaultCredential

Where $ReportExecutionUrl = "http://xxxxx/ReportServer/ReportService2005.asmx?wsdl" via the template parameter

We actually get autocomplete on $ReportExecutionProxy through the Powershell ISE, however the method LoadReportDefinition does not seem to be there?

$ReportExecutionProxy.GetType() returns Microsoft.PowerShell.Commands.NewWebserviceProxy.AutogeneratedTypes.WebServiceProxy1er_ReportService2005_asmx_wsdl.ReportingService2005

@twerthi
Copy link
Contributor

twerthi commented Dec 4, 2015

@jeremyhoughton

The value for $ReportExecutionUrl should look like this:

http://xxxxx/reportserver/ReportExecution2005.asmx?wsdl

The value you've supplied here is what would be for the $ReportServiceUrl, which I would recommend changing to http://xxxxx/ReportServer/ReportService2010.asmx?wsdl

@jeremyhoughton
Copy link
Author

Thanks @twerthi. It works fine now! Maybe it might be worth while putting some error checking in the code to either check for the text "ReportExecution" in the input execution report url or to check whether that url has access to the LoadReportDefinition method? If there is an error raise an exception early suggesting that the input url is invalid?

@twerthi
Copy link
Contributor

twerthi commented Dec 7, 2015

Not a bad idea, I'll look into that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants