I'm getting an issue, see the below, when rendering a pdf report from our SSRS. I have tried to look into different sources and nothing works so far.
Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.MissingEndpointException: 'The attempt to connect to the report server failed. Check your connection information and that the report server is a compatible version.'
I have these line of codes which should work:
var parameters = new List<ReportParameter> { new ReportParameter("paramter_1", "paramter_1_value"), }; var reportServerUrl = ConfigurationManager.AppSettings["ReportServerUrl"]; reportViewer.ServerReport.ReportServerUrl = new Uri(reportServerUrl); reportViewer.ServerReport.ReportPath = '/ReportFolder/ReportName'; reportViewer.ServerReport.ReportServerCredentials = new CustomCredentials(); reportViewer.ServerReport.SetParameters(parameters); reportViewer.ServerReport.Refresh(); var mimeType = ""; var encoding = ""; var filenameExtension = "pdf"; string[] streamids = null; Warning[] warnings = null; var outputFileName = "File_Name.pdf"; var bytes = reportViewer.ServerReport.Render("PDF", null, out mimeType, out encoding, out filenameExtension, out streamids, out warnings); var pdfReport = File(bytes, "application/pdf", outputFileName); Am I doing anything wrong here?
https://stackoverflow.com/questions/65606083/ssrs-rendered-report-in-mvc-causing-a-404-error January 07, 2021 at 11:02AM
没有评论:
发表评论