<script type="text/javascript">
$(function () {
$("#container").ejReportViewer(
{
reportServiceUrl: '/api/ReportApi',
processingMode: ej.ReportViewer.ProcessingMode.Remote,
printMode: true,
reportPath: '~/App_Data/GroupingAgg.rdl'
});
});
</script> |
<script type="text/javascript"> $(function () { $("#ReportViewer1").ejReportViewer( { printMode: true, }); }); </script> <ej:ReportViewer ID="ReportViewer1" runat="server" ClientIDMode="Static" ProcessingMode="Local" ReportPath="~/Reports/Invoice/Invoice.rdlc" Height="1200px" Width="100%" > <ToolbarSettings ShowToolbar="True"></ToolbarSettings> </ej:ReportViewer>
Thanks here is what I used to get it to work for Syncfusion ASP Reportviewer control:
<script type="text/javascript">
$(function () {
$("#ReportViewer1").ejReportViewer(
{
printMode: true,
});
});
</script>
<ej:ReportViewer ID="ReportViewer1" runat="server"
ClientIDMode="Static" ProcessingMode="Local"
ReportPath="~/Reports/Invoice/Invoice.rdlc" Height="1200px"
Width="100%" >
<ToolbarSettings ShowToolbar="True"></ToolbarSettings>
</ej:ReportViewer>
Just to confirm I got it working using the code as per my last post.
|
We have printLayout() method to render/change the print option in our ReportViewer component. So please invoke the printLayout() method to change the print layout once rendered reportviewer container as shown in below code example,
We have prepared the sample and it can be downloaded from,
Sample: http://www.syncfusion.com/downloads/support/directtrac/general/ze/ReportViewerSample-1623071569.zip
Please refer to the below UG documentation for more information,
| |
I should have also mentioned that the ReportServiceURL was set in my case from code behind. |
Yes, you can also specify the ReportServiceURL in aspx.cs page from code behind to render the ReportViewer control as shown in the following code example,
Default.aspx.cs:
We have prepared a sample based on this and shared in above response. |