ReportViewer to send parameters and report name to controller API Rest

3 posts, 0 answers
  1. Óscar
    Óscar avatar
    1 posts
    Member since:
    Jun 2018

    Posted 04 Sep 2019 Link to this post


    I have the following code in view:

    <script type="text/javascript">         


                           templateUrl: "/Resources/Templates/telerikReportViewerTemplate.html",                 

                           serviceUrl: "/api/reports",                 

                           reportSource: {report: "VentasFamilia.trdp",

                                                   parameters: {                     

                                                           Delegaciones: $("#filterDelegacion").data("kendoMultiSelect").value(),                               Familias: $("#filterFamilia").data("kendoMultiSelect").value(),                     

                                                          Series: $("#filterSerie").data("kendoMultiSelect").value(),                    

                                                          FechaInicio: $("#desde").val(),                     

                                                          FechaFin: $("#hasta").val()                   





    How should I do on the controller to receive the parameters and name of the report?

  2. Francisco
    Francisco  avatar
    5 posts
    Member since:
    Jul 2016

    Posted 05 Sep 2019 Link to this post

    I have the same question.
  3. Silviya
    Silviya avatar
    424 posts

    Posted 09 Sep 2019 Link to this post

    Hi Óscar and Francisco,

    The parameter values passed from the Html5 Report Viewer will be assigned to the Report Parameters of the report by matching parameters' names.

    The client reportSource parameters collection is not accessible in Report Resolver. If you would like to use or set parameter values in the custom report resolver, it will be necessary to pass them as part of the reportSource().report string, and use custom logic in the resolver to extract those values and assign them manually to the corresponding report parameters. This can be done by instantiating/deserializing the report in the Resolve() method, setting the report parameters' values, wrapping the modified report instance in an InstanceReportSource and returning the latter to the reporting engine

    Best Regards,
    Progress Telerik

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top