This is a migrated thread and some comments may be shown as answers.

Using Inline Parameter with WebServiceDataSource and Report Parameter Value

6 Answers 355 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Guilherme
Top achievements
Rank 1
Guilherme asked on 26 Nov 2019, 08:03 PM

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>

6 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 27 Nov 2019, 01:04 PM

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
0
Guilherme
Top achievements
Rank 1
answered on 27 Nov 2019, 02:21 PM

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.

0
Nasko
Telerik team
answered on 27 Nov 2019, 02:50 PM

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
0
Guilherme
Top achievements
Rank 1
answered on 27 Nov 2019, 07:12 PM

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.

 

0
Accepted
Nasko
Telerik team
answered on 28 Nov 2019, 07:00 AM

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
0
Guilherme
Top achievements
Rank 1
answered on 28 Nov 2019, 12:26 PM

Hi Nasko,

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

Thank you again.

Tags
General Discussions
Asked by
Guilherme
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Guilherme
Top achievements
Rank 1
Share this question
or