By following the instructions on this page: How To: Use HTML5 ASP.NET Report Viewer, I've been able to incorporate a Telerlik sample report into my app.The code it created is below. But now I'd like to have it reference my own Telerik report I've created. The report is in a different project (named MyApp.Reporting) and the name of the report is RentReceipt.cs. The report also takes a single parameter (named ClientID). How can I change the code below to reference my own report and pass it the required parameter?
<script type="text/javascript">
$(document).ready(function () {
$("#reportViewer1")
.telerik_ReportViewer({
// The URL of the service which will serve reports.
// The URL corresponds to the name of the controller class (ReportsController).
// For more information on how to configure the service please check http://www.telerik.com/help/reporting/telerik-reporting-rest-conception.html.
serviceUrl: "/api/reports",
// The URL for custom report viewer template. The template can be edited -
// new functionalities can be added and unneeded ones can be removed.
// For more information please check http://www.telerik.com/help/reporting/html5-report-viewer-templates.html.
// templateUrl: '/ReportViewer/templates/telerikReportViewerTemplate-11.0.17.222.html',
//ReportSource - report description
reportSource: {
// The report can be set to a report file name (trdx report definition)
// or CLR type name (report class definition).
report: "SampleReport.trdp"
},
// Specifies whether the viewer is in interactive or print preview mode.
// PRINT_PREVIEW - Displays the paginated report as if it is printed on paper. Interactivity is not enabled.
// INTERACTIVE - Displays the report in its original width and height without paging. Additionally interactivity is enabled.
viewMode: telerikReportViewer.ViewModes.INTERACTIVE,
// Sets the scale mode of the viewer.
// Three modes exist currently:
// FIT_PAGE - The whole report will fit on the page (will zoom in or out), regardless of its width and height.
// FIT_PAGE_WIDTH - The report will be zoomed in or out so that the width of the screen and the width of the report match.
// SPECIFIC - Uses the scale to zoom in and out the report.
scaleMode: telerikReportViewer.ScaleModes.SPECIFIC,
// Zoom in and out the report using the scale
// 1.0 is equal to 100%, i.e. the original size of the report
scale: 1.0,
ready: function () {
//this.refreshReport();
},
});
});
</script>