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

Report Viewer interferes with grid paging

1 Answer 39 Views
Grid
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
Iron
Iron
Iron
David asked on 22 Mar 2019, 02:04 AM

I've got a view with a Html.TelerikReporting().ReportViewer() mvc helper.

in a partial view I load a Html.Kendo().Grid<FFDashboardWeb.Models.PDocDashboardGridViewModel>()

 

if I enable any paging features on the grid, I get javascript errors when it executes the datasource read event . The javascript is breaking in the =report viewer= javascript file! It's like the report viewer is intercepting the datasource callback?

 

If I remove the report viewer from the page, the grid works fine.

 

 @(Html.Kendo().Grid<FFDashboardWeb.Models.PDocDashboardGridViewModel>()
                                .Name("documentDetail")
                                .Columns(columns =>
                                {
                                    columns.Bound(m => m.Id).Hidden().Title("Date Scanned").Width(150).Format("{0:d}");
                                    columns.Bound(m => m.TransactionDate).Title("Date Scanned").Width(150).Format("{0:d}");
                                    columns.Bound(m => m.Result).Title("Result").Width(150);
                                    columns.Bound(m => m.DocumentClassName).Title("Document").Width(400);
                                    columns.Bound(m => m.IssuingStateName).Title("State").Width(150);
                                    columns.Bound(m => m.AlertsJoined).Title("Alerts");
                                })
                               .Pageable()
                                .Sortable(sortable =>
                                {
                                    sortable.SortMode(GridSortMode.SingleColumn);
                                })
                                .Scrollable(s => s.Height("auto"))
                                .DataSource(ds => ds
                                    .Ajax()
                                    .Batch(false)
        .PageSize(20)
        .ServerOperation(true)
                                    .Model(model => model.Id("Id"))
                                    .Read(read => read.Action("kgrdDashboardDetails_read", "Home").Data("includeDetailParameters"))
                                )
                    )

 

These are in the _Layout
    <script src="https://kendo.cdn.telerik.com/2019.1.115/js/jszip.min.js"></script>
    <script src="https://kendo.cdn.telerik.com/2019.1.115/js/kendo.all.min.js"></script>
    <script src="https://kendo.cdn.telerik.com/2019.1.115/js/kendo.aspnetmvc.min.js"></script>

 

These are in the specific page where the report viewer is needed

    <script src="@Url.Content("~/ReportViewer/js/telerikReportViewer.kendo-13.0.19.116.min.js")"></script>
    <script src="@Url.Content("~/ReportViewer/js/telerikReportViewer-13.0.19.116.min.js")"></script>

 

  @(Html.TelerikReporting().ReportViewer()
                            .Id("rvResultDistViewer")
                            .ServiceUrl(Url.Content("~/api/reports"))
                            .ReportSource(rsrcResultDist)
                            .ViewMode(ViewMode.Interactive)
                            .ScaleMode(ScaleMode.FitPage)
                            .PersistSession(false)
                            .PrintMode(PrintMode.AutoSelect)
                            .SendEmail(new SendEmail { Enabled = false })
                            .EnableAccessibility(false)
                            .PageMode(PageMode.SinglePage)
                            .ClientEvents(e =>
                            {
                                {
                                    e.Ready("handleViewerReady_main");
                                    e.PageReady("handlePageReady_main");
                                    e.InteractiveActionExecuting("handleResultClick");
                                }
                            })
            )

1 Answer, 1 is accepted

Sort by
0
Angel Petrov
Telerik team
answered on 25 Mar 2019, 03:22 PM
Hi,

Based on the information it would be difficult to determine what exactly is causing this error. Can you please open a formal support ticket and attach a sample in which this issue can be observed?

Regards,
Angel Petrov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
David
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Angel Petrov
Telerik team
Share this question
or