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>