Hiding parameter options from users in ASP.NET MVC Edition ReportViewer

Posted by: alhad on 14 February 2019, 5:32 pm EST

  • Posted 14 February 2019, 5:32 pm EST

    Hi,

    I am using the example given in
    https://demos.componentone.com/aspnet/reportviewer101 to pass parameter values to the report viewer. The report displays correctly, but I want to hide the parameter options from the user. The report is for invoice printing, so user has nothing to select. How can I do that?
  • Marked as Answer

    Replied 17 February 2019, 10:44 pm EST

    Hi,
    We are sorry, we do not have any direct way to accomplish this. However, you may close the panel by handling the OnClientRefreshed event and within setTimeout close the panel by pseudo click.
    For reference, please find the code-snippet below:

    <script>
    function refreshed(viewer,e){
    setTimeout(function(){
    var _btn=viewer.hostElement.querySelector('[wj-part="splitter"]');
    _btn.click();
    },3000); // timeout may veries depends on the respons from the server
    }</script>
    @Html.C1().ReportViewer().OnClientRefreshed("refreshed")


    Hope it helps!

    Please let us know if you have any additional question.


    Regards,
    Manish Gupta
  • Replied 27 February 2019, 12:47 am EST

    Thanks Manish.
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels