Error exporting reports to sharepoint from VS2019

  • Thread starter Thread starter J-Bal
  • Start date Start date
J

J-Bal

Guest
I am having an issue exporting some reports to a sharepoint url from a VS 2019 windows form project. Previously the .exe was being run from a 2008 citrix platform and the exports ran successfully. We have recently moved it to an RDS 2019 server and now I am getting the error 'Network name cannot be found" when trying to export. See code below. I am assuming I need to modify my path to some other type of syntax etc but not sure what it would be.

Dim warnings As Warning() = Nothing
Dim streamids As String() = Nothing
Dim mimeType As String = Nothing
Dim encoding As String = Nothing
Dim extension As String = Nothing
Dim bytes As Byte()
Dim viewer As New ReportViewer
ExportRptPath = "//portal.net/Rpts/Report.pdf"

File.Delete(ExportRptPath)

bytes = ReportViewer1.LocalReport.Render("PDF", Nothing, mimeType, encoding, extension, streamids, warnings)
Dim fs As New FileStream(ExportRptPath, FileMode.Create)
fs.Write(bytes, 0, bytes.Length)

Continue reading...
 
Back
Top