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

Telerik ReportLibrary.dll to HTML5 report viewer

1 Answer 318 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Lyubomir
Top achievements
Rank 1
Lyubomir asked on 22 Nov 2015, 12:07 PM

Hello,

I can't find an anwser or i don't know what to search for my issue.

I have a reportlibrary.dll file from a Telerik Reporting Q2 Project.

 

I can use it in WebForms Application with the ReportViewer.aspx.

 

How ever i want to make a new Telerik MVC App which is based on Kendo and optimized for mobile browsers (responsive).

I can't find a definite anwser how to use the existing .dll with the ports with the HTML5 viewer.

So far i've tried with the documentation a standalone REST service and an integrated ReportPage.html.

However they seem to work only with .trdx files.

Can you point me a source for reading or even better attach a demo solution file with this structure.

 

Regards,

1 Answer, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 25 Nov 2015, 03:07 PM
Hello Lyubomir,

A report from an existing assembly can be displayed in the HTML5 Report Viewer by setting the viewer's reportSource.report property to the assembly-qualified name of the report:
<script type="text/javascript">
        $("#reportViewer1")
            .telerik_ReportViewer({
                serviceUrl: "/api/reports/",
                templateUrl: '/ReportViewer/templates/telerikReportViewerTemplate-x.x.x.x.html',
                reportSource: {
                    report: "Telerik.Reporting.Examples.CSharp.ProductCatalog, CSharp.ReportLibrary",
                    parameters: {
                        CultureID: "en"
                    }
                }
            });
</script>

With the MVC Report Viewer you can get the assembly-qualified name of the report like this:
@(Html.TelerikReporting().ReportViewer()
       .Id("reportViewer1")
       .ServiceUrl("/api/reports/")
       .TemplateUrl("/ReportViewer/templates/telerikReportViewerTemplate.html")
       .ReportSource(new TypeReportSource() { TypeName = typeof(ProductCatalog).AssemblyQualifiedName })
       .ViewMode(ViewMode.Interactive)
       .ScaleMode(ScaleMode.Specific)
       .Scale(1.0)
       .PersistSession(false)
       .Deferred()
       )


Regards,
Nasko
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
Tags
General Discussions
Asked by
Lyubomir
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Share this question
or