Check out the latest Sales updates!Learn about the key capabilities and features of Dynamics 365 Sales and experience some of the new features.
Download overview guide | Watch Sales video
2020 release wave 1Discover the latest updates and new features to Dynamics 365 planned through September 2020
Release overview guides and videos Release Plan | Preview 2020 Release Wave 1 TimelineWatch the 2020 Release Wave 1 virtual launch event
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Upcoming TechTalks
I am a junior dynamics developer and I am trying to retrieve a report from SSRS in a C# plugin.
I used ReportExecution2005.asmx as a web reference to generate the classes necessary for this task.
I pass the credentials, report path and the server URL through a json using Unsecure Config.
The problem is that I receive the following error:
System.Web.Services.Protocols.SoapException: The item '/reports_crm365/report/testv9_MSCRM/ContactList' cannot be found. ---> Microsoft.ReportingServices.Diagnostics.Utilities.ItemNotFoundException: The item '/reports_crm365/report/testv9_MSCRM/ContactList' cannot be found.
The error occurs when I am trying to load report using the LoadReport method of the ReportExecutionService class.
I am really sure that the report path is correct. My security roles in SSRS are the following:
This is the code of my getReport method, where ReportAttachment is a class where I deserialize the JSON from unsecure config:
public static class ReportTools
public static byte GetReport(ReportAttachment reportInfos)
byte report = null;
Warning warnings = null;
string streamIDs = null;
string historyId = null;
string debug = "";
string reportPath = reportInfos.reportPath;
string reportServerUrl = reportInfos.reportServer;
string reportConnectionUser = reportInfos.ssrsUser;
string password = reportInfos.ssrsPass;
string reportConnectionDomain = reportInfos.domainName;
if (string.IsNullOrEmpty(reportServerUrl) || string.IsNullOrEmpty(reportPath)
|| string.IsNullOrEmpty(reportConnectionUser) || string.IsNullOrEmpty(password)
|| string.IsNullOrEmpty(reportConnectionDomain)) return report;
NetworkCredential credentials = new NetworkCredential(reportConnectionUser, password, reportConnectionDomain);
ReportExecutionService reportExecutionService = new ReportExecutionService();
reportExecutionService.PreAuthenticate = true;
reportExecutionService.Credentials = credentials;
reportExecutionService.Url = reportServerUrl;
ExecutionHeader execHeader = new ExecutionHeader();
reportExecutionService.ExecutionHeaderValue = execHeader;
ExecutionInfo execInfo = new ExecutionInfo();
execInfo = reportExecutionService.LoadReport(reportPath, historyId);
string sessionId = reportExecutionService.ExecutionHeaderValue.ExecutionID;
report = reportExecutionService.Render("PDF",
catch (Exception ex)
throw new InvalidPluginExecutionException("THE RAPORT COULD NOT BE RETRIEVED "+ex.Message);
You need to verify if the path is correct and the if credentials used by web service are valid for this report.
I also tried with testv9_MSCRM/ContactList as being the report path. The result is the same.
My report's data source takes from a 9.0 on premise instance. I logged in on that data source using the user guid as username and organization guid as password.
I added this code snip to my method before the execution of the LoadReport method:
DataSourceCredentials datasetCredential = new DataSourceCredentials();
datasetCredential.DataSourceName = "D365OnPremV2";
datasetCredential.UserName = "userGuid";
datasetCredential.Password = "orgGuid";
DataSourceCredentials credentials2 = new DataSourceCredentials;
credentials2 = datasetCredential;
But with no success.
Business Applications communities