Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi
SSRS report is migrated to power BI and below code I am using. On objRSExec.LoadReport() shows error "The path of the item 'https://<serverName>/Reports/browse/RapoRSReports/ExportReport.rdl' is not valid. The full path must be less than 260 characters long; other restrictions apply. If the report server is in native mode, the path must start with slash. ---> Microsoft.ReportingServices.Diagnostics.Utilities.InvalidItemPathException: The path of the item 'https://<serverName>/Reports/browse/RapoRSReports/ExportReport.rdl' is not valid. The full path must be less than 260 characters long; other restrictions apply. If the report server is in native mode, the path must start with slash."
byte[] objResult = null;
FileStream objStream = default(FileStream);
string strFileType = "EXCEL";
string strFileExtension = ".xls";
string strFullPathName = "D:/Output/Export.xls";
Warning[] warnings = null;
string[] streamIDs = null;
objParam1.Name = "User";
objParam1.Value = "Umesh"
objParam2.Name = "Year";
objParam2.Value = 2010
objParams[0] = objParam1;
objParams[1] = objParam2;
objRSExec.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials;
objRSExec.Url ="https://<serverName>/ReportServer/ReportExecution2005.asmx";
objRSExec.LoadReport("https://<serverName>/Reports/browse/RapoRSReports/ExportReport.rdl", null);
objRSExec.Timeout = 200000;
objResult = objRSExec.Render(strFileType, null, out strFileExtension, out encoding, out mimeType, out warnings, out streamIDs);
objStream = File.Create(strFullPathName, objResult.Length);
objStream.Write(objResult, 0, objResult.Length);
objStream.Close();
GC.Collect();
objStream.Dispose();
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
13 | |
2 | |
2 | |
1 | |
1 |
User | Count |
---|---|
20 | |
3 | |
2 | |
2 | |
2 |