I'm using a rdlc reportviewer to render a report directly to excel. the below code works on my development but not once I publish the app. can't figure out what the problem is. I get no errors
any help would be appreciated
Thanks
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 fs As New FileStream("c:\Export_Reports\MyReport.xls", FileMode.OpenOrCreate)
rv1.ProcessingMode = ProcessingMode.Local
rv1.LocalReport.ReportPath = Server.MapPath("~/Reports_rdlc/MyReports.rdlc")
Dim dsReleased2 As sp_1 = sp()
Dim datasource As New ReportDataSource("sp_1", dsReleased2.Tables(0))
rv1.LocalReport.DataSources.Clear()
rv1.LocalReport.DataSources.Add(datasource)
bytes = rv1.LocalReport.Render("Excel", Nothing, mimeType, encoding, extension, streamids, warnings)
fs.Write(bytes, 0, bytes.Length)
fs.Close()
any help would be appreciated
Thanks
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 fs As New FileStream("c:\Export_Reports\MyReport.xls", FileMode.OpenOrCreate)
rv1.ProcessingMode = ProcessingMode.Local
rv1.LocalReport.ReportPath = Server.MapPath("~/Reports_rdlc/MyReports.rdlc")
Dim dsReleased2 As sp_1 = sp()
Dim datasource As New ReportDataSource("sp_1", dsReleased2.Tables(0))
rv1.LocalReport.DataSources.Clear()
rv1.LocalReport.DataSources.Add(datasource)
bytes = rv1.LocalReport.Render("Excel", Nothing, mimeType, encoding, extension, streamids, warnings)
fs.Write(bytes, 0, bytes.Length)
fs.Close()