Hello,
I'm trying to render the report viewer on demand, collecting the parameters from the view.
I created a partial view with the report content, but it doesn't render:
the view:
@section ScriptSection
{
<script type="text/javascript">
function showReport() {
var reportUrl = $("#hfReportUrl").val();
$("#report-container").load(reportUrl);
}
</script>
}
@section ControlsSection{
<div style="width: 100%">
<button type="submit" id="btnShowReport" onclick="showReport()">Show report</button>
<div id="report-container">
</div>
</div>
@*@Html.Hidden("hfPartialReportUrl", ViewBag.PartialReportUrl);*@
}
the partial view:
@using Syncfusion.MVC.EJ
@(
Html.EJ().ReportViewer("reportviewer")
.ProcessingMode(Syncfusion.JavaScript.ReportViewerEnums.ProcessingMode.Local).ReportPath("Product Catalog.rdlc")
.ReportServiceUrl(VirtualPathUtility.ToAbsolute("~/api/RDLCReport"))
)
and for ReportViewerController:
public ActionResult DocumentMap()
{
ViewData["PartialReportUrl"] = Url.Action("RenderDocumentMap");
return View();
}
public ActionResult RenderDocumentMap()
{
return PartialView("Partial/_DocumentMapPartial");
}
Any suggestions?
Thank You.