aspnetcore-angular-universal icon indicating copy to clipboard operation
aspnetcore-angular-universal copied to clipboard

How to display cshtml PartialView in html page

Open helloneoberg opened this issue 7 years ago • 1 comments

Hi, I am need to use SSRS reports inside the angular project to display some reports. I am using a ReportViewer solution (https://alanjuden.com/2016/11/10/mvc-net-core-report-viewer/) to display the SSRS reports as Net Core doesn't support Microsoft ReportViewer directly. The solution uses View and Controller but i need to display the view inside the angular html page, thus does anyone know how to display it?

Below is the PartialView

public PartialViewResult GetMyReport()
 {
      ReportViewerModel model = this.GetReportViewerModel(Request);
      model.ReportPath = "/MyReportFolder/MySalesReport";
      model.AddParameter("Parameter1", location);
      model.AddParameter("Parameter2", Date);
      return PartialView("ReportViewer", model);
}

Any help is much appreciated. Thank you.

helloneoberg avatar Jan 27 '18 11:01 helloneoberg

Hi,

Did you tried simple ajax-ing of you partial view action GetMyReport, and then putting result html into div using [innerHTML] Angular binding?

etatuev avatar Feb 08 '18 18:02 etatuev