Hello everybody,
I'm triyng to define a custom DocumentName for my Report Book (trbp) from Javascript for TelerikViewer. Here my code example for your reference.
First I initialize telerik Report Viewer:
$scope.loadTelerikViewer = function () {
$("#reportViewer").telerik_ReportViewer({
serviceUrl: "/api/reports",
reportSource: {
report: null,
parameters: {
}
},
// 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,
}
Than based on required report Id i change the report source as follow:
var viewer = $("#reportViewer").data("telerik_ReportViewer");
if ($scope.reportId == 1) {
viewer.reportSource({
report: $scope.fileReportName,
parameters: {
ReportTitle: $scope.reportTitle,
DownloadFileName: $scope.downloadFileName,
ConnectionString: $scope.dbStringConn,
Client: $scope.JobObject.Client,
ManufacturingPlant: $scope.JobObject.PlantClient + ' ' + $scope.JobObject.StateClient,
Plant: $scope.JobObject.JobDescription,
JobId: $scope.JobObject.JobId,
ShowAllDoc: $scope.allDocument
}
});
}
Is there a way to define a custom Document Name for my given TRBP file?
Thanks
Bruno