Hello,
I have created a Telerik Reporting REST service in order to render "telerik reports" on my Web Application in HTML 5 view. I am currently using the following code on my Web Application page "Report.aspx" to consume the service.
<script type="text/javascript">
$("#reportViewer1")
.telerik_ReportViewer({
serviceUrl: "http://localhost:62355/api/reports/",
templateUrl: '/ReportViewer/templates/telerikReportViewerTemplate.html',
reportSource: {
report: "VB.ReportLibrary.ReportCatalog, VB.ReportLibrary",
parameters: {
}
},
viewMode: "ViewModes.INTERACTIVE",
scaleMode: "ScaleModes.SPECIFIC",
scale: "1.0",
PersistSession: "true"
});
</script>
When I open "Report.aspx" it throws an error "Client with ID '[object Object]' not found. Expired" on locally running Service App (See attached image "ServiceError.jpg"). At the same time client side(Web App page Report.aspx) shows an alert message "Gone" (See Image 410_Gone.jpg). ReportsController.vb code is as follows:
Imports Telerik.Reporting.Cache.Interfaces
Imports Telerik.Reporting.Services.Engine
Imports Telerik.Reporting.Services.WebApi
Imports System.IO
Imports System.Web.Http.Cors
'The class name determines the service URL.
'ReportsController class name defines /api/report/ service URL.
<EnableCors("http://localhost:53274", "*", "*")>
Public Class ReportsController
Inherits ReportsControllerBase
Shared configurationInstance As Telerik.Reporting.Services.ReportServiceConfiguration
Shared Sub New()
'This is the folder that contains the trdx or trdp report definitions
'In this case this is the Reports folder
Dim appPath = HttpContext.Current.Server.MapPath("~/")
Dim reportsPath = Path.Combine(appPath, "Reports")
'Add resolver for trdx report definitions,
'then add resolver for class report definitions as fallback resolver;
'finally create the resolver and use it in the ReportServiceConfiguration instance.
Dim resolver = New ReportFileResolver(reportsPath) _
.AddFallbackResolver(New ReportTypeResolver())
'Setup the ReportServiceConfiguration
Dim reportServiceConfiguration As New Telerik.Reporting.Services.ReportServiceConfiguration()
reportServiceConfiguration.HostAppId = "reportViewer1"
reportServiceConfiguration.ReportResolver = resolver
reportServiceConfiguration.Storage = New Telerik.Reporting.Cache.File.FileStorage()
reportServiceConfiguration.ReportSharingTimeout = 0
reportServiceConfiguration.ClientSessionTimeout = 9999
configurationInstance = reportServiceConfiguration
End Sub
Public Sub New()
'Initialize the service configuration
Me.ReportServiceConfiguration = configurationInstance
End Sub
Protected Overrides Function CreateCache() As ICache
Return Telerik.Reporting.Services.Engine.CacheFactory.CreateFileCache()
End Function
End Class
Can you please provide a solution regarding same. My end goal is to render telerik report on web form page using html 5 report viewer (See expected_result.jpg).