I have used below code to call RDLC file from one application to another application. Below code resides in one application. RDLC file resides in another application.
Dim RptVwr As New Microsoft.Reporting.WebForms.ReportViewer()
Dim ds As DataSet = OBJ.GetInventoryProductDetails(plannerCode)
Dim RptDtSrc As New Microsoft.Reporting.WebForms.ReportDataSource()
RptDtSrc.Name = "XXXXXX1"
RptDtSrc.Value = ds.Tables(0)
RptVwr.LocalReport.DataSources.Add(RptDtSrc)
Dim RptDtSrc1 As New Microsoft.Reporting.WebForms.ReportDataSource()
RptDtSrc1.Name = "XXXXXX2"
RptDtSrc1.Value = ds.Tables(1)
RptVwr.LocalReport.DataSources.Add(RptDtSrc1)
RptVwr.LocalReport.ReportPath = "http://localhost:58154/RDLC/GLA_InspectionList.rdlc"
RptVwr.LocalReport.EnableHyperlinks = True
Dim excelcontent As Byte() = RptVwr.LocalReport.Render("Excel", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing)
Dim FS As FileStream
FS = New FileStream(Save, FileMode.Create)
FS.Write(excelcontent, 0, excelcontent.Length)
FS.Close()
But above code fails during excel file generation. How to fix the above issue?