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

Telerik Report Not displaying in MVC 6

1 Answer 83 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
kannan
Top achievements
Rank 1
kannan asked on 19 Jul 2017, 06:01 PM

Hi There,

         I'm trying to displaying Telerik report in MVC 6 , its doesn't throw any error either doesn't display the Report viewer with the report. I have provided the Razor code over here . When I Use fiddler, the webapi is throwing an error Telerik.Reporting.Services.Engine.InvalidReportException, from Telerik.Reporting.Services.Engine.ReportEngine.ResolveReportSource(String report). Please help to resolve the issue. Attached the fillder_log as well.

@{var typeReportSource = new TypeReportSource() { TypeName = typeof(BarcodesReport).AssemblyQualifiedName }; }
@(
    Html.TelerikReporting().ReportViewer()
            .Id("Testreport1")
                .ServiceUrl("http://localhost/api/reports/")
                    .TemplateUrl("http://localhost/ReportViewer/templates/telerikReportViewerTemplate.html")
               .ReportSource(typeReportSource)
                .ViewMode(ViewMode.Interactive)
                .ScaleMode(ScaleMode.Specific)
                .Scale(1.0)
                .PersistSession(false)
                .PrintMode(PrintMode.AutoSelect)
                .Deferred()
                   
)
<select id="theme-switcher"></select>
@section scripts
{
    <!--kendo.all.min.js can be used as well kendo.web.min.js and kendo.mobile.min.js-->
    <script src="@Url.Content("~/ReportViewer/js/telerikReportViewer.kendo-11.1.17.614.min.js")"></script>
    <script src="@Url.Content("~/Scripts/themeSwitcher.js")"></script>
    <script src="@Url.Content("~/ReportViewer/js/telerikReportViewer-11.1.17.614.js")"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            //Theme switcher
            themeSwitcher(
                '#theme-switcher',
                '#common-css',
                '#skin-css');
        });
    </script>
    @(Html.TelerikReporting().DeferredScripts())
}

 

 

1 Answer, 1 is accepted

Sort by
0
Katia
Telerik team
answered on 24 Jul 2017, 09:28 AM
Hi kannan,

This exception is raised when the ReportResolver used by the Reporting REST service cannot resolve a valid ReportSource object. ReportResolver is defined in the ReportsController, you can test replacing your implementation of the ReportsController with the default one - How To: Implement the ReportsController in an application.

If BarcodesReport is in the separate project run the Upgrade Wizard in Visual Studio to make sure that all projects are using the same version of Telerik Reporting.

Note that the fiddler log is missing, the allowed file extensions are .gif, .jpg, .jpeg, .png. If the issue persists, share the implementation of ReportsController and custom report resolver (if any).


Regards,
Katia
Progress 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
kannan
Top achievements
Rank 1
Answers by
Katia
Telerik team
Share this question
or