Using Inline Parameter with WebServiceDataSource and Report Parameter Value

7 posts, 1 answers
  1. Guilherme
    Guilherme avatar
    4 posts
    Member since:
    Nov 2018

    Posted 26 Nov 2019 Link to this post

    Hello, 

    Using inline parameter in web Service Data Source works only when I put the parameter directly like in image 1. If I put the parameter with a expression like in image 2 the response errors like in image 3. Image4 is the working report with the parameter value set 29 directly.

    This is the Report.cshtml that I using:

    <link href="//cdn.kendostatic.com/2019.1.115/styles/kendo.common.min.css" rel="stylesheet" />
    <link href="//cdn.kendostatic.com/2019.1.115/styles/kendo.blueopal.min.css" rel="stylesheet" />

    <script src="/api/reports/resources/js/telerikReportViewer"></script>
    <style>
        #reportViewer1 {
            position: absolute;
            left: 5px;
            right: 5px;
            top: 50px;
            bottom: 5px;
            overflow: hidden;
            font-family: Verdana, Arial;
        }
    </style>



    <div id="reportViewer1">
        loading...
    </div>

    <script>
            $(document).ready(function () {
                $("#reportViewer1")
                    .telerik_ReportViewer({
                        serviceUrl: "/api/reports/",
                        reportSource: {
                            report: "@ViewBag.Report",
                            parameters: {
                                idEvento: 29
                            }
                        },
                        viewMode: telerikReportViewer.ViewModes.INTERACTIVE,
                        scaleMode: telerikReportViewer.ScaleModes.SPECIFIC,
                        scale: 1.0
                    });
            });
        </script>
  2. Nasko
    Admin
    Nasko avatar
    1071 posts

    Posted 27 Nov 2019 Link to this post

    Hi Guilherme,

    There is a known bug with the WebServiceDataSource parameters which was fixed in Telerik Reporting R3 2019 SP1 (13.2.19.1030). Please upgrade to the latest version and check if the described issue is resolved.

    Regards,
    Nasko
    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
  3. Guilherme
    Guilherme avatar
    4 posts
    Member since:
    Nov 2018

    Posted 27 Nov 2019 in reply to Nasko Link to this post

    Hi Nasko,

     

    I upgrade the version and the error in Telerik Report Designer when I click in Download is solved, using the expression = Parameter.idEvento.Value in configurate web data source, but the error 400 bad request continues in debug mode.

  4. Nasko
    Admin
    Nasko avatar
    1071 posts

    Posted 27 Nov 2019 Link to this post

    Hello Guilherme,

    You can intercept the request made in debug mode using Fiddler and check if everything looks correct. If you can send us a runnable report in a support ticket, we can debug it on our end and provide further information.

    Regards,
    Nasko
    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
  5. Guilherme
    Guilherme avatar
    4 posts
    Member since:
    Nov 2018

    Posted 27 Nov 2019 in reply to Nasko Link to this post

    Hello again Nasko,

    I installed the Fiddler application and check the request executed and I see this error:

    GET http://localhost:5010/api/patrocinio/=%20Parameters.idEvento.Value/roomlist HTTP/1.1
    Accept: application/json
    Host: localhost:5010

    The parameter idEvento doesn't enter in the place of the parameter value.

     

    Thank you for awsering so quickly.

     

  6. Answer
    Nasko
    Admin
    Nasko avatar
    1071 posts

    Posted 28 Nov 2019 Link to this post

    Hi Guilherme,

    This is the issue which was introduced in the old version of Telerik Reporting. It is fixed in the latest release. If you continue to receive the error, it means that the project is not upgraded properly to the latest version. Please check the assemblies referenced in the project and make sure that their version is the latest. Also check the bin folder of the application. You can use the Upgrade Wizard to perform the upgrade.

    Regards,
    Nasko
    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
  7. Guilherme
    Guilherme avatar
    4 posts
    Member since:
    Nov 2018

    Posted 28 Nov 2019 in reply to Nasko Link to this post

    Hi Nasko,

    Thank you, I changed the dll in bin folder and also change the assemblies references and works fine.

    Thank you again.

Back to Top