How to open the RDL file at the time of opening the Report Designer
To open a server report by its report path when the Bold Reports® ASP.NET MVC Report Designer opens, bind a function to the create API and call the openReport method with the report path. Use the following steps:
-
Create a function and bind it with the
createAPI in theIndex.cshtmlfile as in the following code snippet:<div style="height:500px"> @(Html.Bold().ReportDesigner("designer") .Create("controlInitialized") ) </div> <script type="text/javascript"> function controlInitialized(args) { ... } </script> -
Use the
openReportmethod in the function along with the report path that was previously created, as in the following code snippet:function controlInitialized(args) { var designer = $('#designer').data('boldReportDesigner'); designer.openReport("/Sample Reports/Sales Report"); }