Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
umeshlade
New Member

Export SSRS report from Power BI using SSIS

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();

0 REPLIES 0

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.