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

MVC ReportViewer inside Kendo Window

1 Answer 219 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Sasa
Top achievements
Rank 1
Sasa asked on 03 Dec 2015, 12:29 PM

I have partial view:

@section head
{
    <script src="~/ReportViewer/js/telerikReportViewer-8.1.14.804.js"></script>
    <script src="~/ReportViewer/js/resources.hr-HR.js"></script>
    <link href="~/ReportViewer/styles/telerikReportViewer-8.1.14.804.css" rel="stylesheet" />
    <link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css"
          rel="stylesheet">
    <style>
        #reportViewer1 {
            position: absolute;
            left: 15px;
            right: 15px;
            top: 65px;
            bottom: 50px;
            overflow: hidden;
        }
    </style>
}
 
@{
    var typeReportSource = new TypeReportSource() { TypeName = string.Format("ATICRaspored.Reports.{0}, ATICRaspored", ViewBag.ReportName) };
    typeReportSource.Parameters.Add("PredavacId", new Guid(((ClaimsIdentity)User.Identity).FindFirst("PredavacId").Value));
    typeReportSource.Parameters.Add("AkGodId", ViewBag.AkGodId);
    typeReportSource.Parameters.Add("AkGodNaziv", ViewBag.AkGodNaziv);
}
 
@(
 Html.TelerikReporting().ReportViewer()
  .Id("reportViewer1")
  .ServiceUrl("/api/reports/")
  .TemplateUrl(Url.Content("~/ReportViewer/templates/telerikReportViewerTemplate-8.1.14.804.html"))
  .ReportSource(typeReportSource)
  .ViewMode(ViewModes.PRINT_PREVIEW)
  .ScaleMode(ScaleModes.SPECIFIC)
  .Scale(1)
  .PrintMode(PrintMode.AutoSelect)
)

On button click I need to show my partial view inside kendo window. My code is:

@(Html.Kendo().Window().Name("ReportViewer")
    .Title("IzvjeĆĄtaj!")
    .Visible(false)
    .Modal(true)
    .Draggable(true)
    .Resizable(x => x.Enabled(true))
    .Width(800)
    .Height(800))
 
<script>
    $("#btnReportKolegij").click(function () {
        var site = site || {};
        site.baseUrl = site.baseUrl || "";
 
        var wnd = $("#ReportViewer").data("kendoWindow");
        wnd.refresh(site.baseUrl + "/Home/_ReportContainer/" + '@Model.Id' + "/" + '@Model.GodineMerge.Replace('/', '-')' + "/EvidencijaOdrzaneNastaveKolegij").center().open();
    });
</script>

 

On click my window is opened but it's only showing "Loading..." as you can see on the attached image. Without kendo window and with simple view everything is working.

What am I missing?

Thanks

1 Answer, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 08 Dec 2015, 09:21 AM
Hello Sasa,

Most probably the viewer's resources cannot be found by the widget. Please run Fiddler to see which requests fail.

In case the issue persists, please open a support ticket where you can zip and attach a sample project exhibiting the issue. We will review it and then will be able to provide additional suggestions.

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
Sasa
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Share this question
or