telerikReportViewer exception when preview a report item

1 Answer 32 Views
Report Viewer - HTML5
Spyros
Top achievements
Rank 1
Spyros asked on 29 May 2025, 08:35 AM

Hello,

I have obtained a trial license for Telerik Reports and have downloaded version 2025.Q2. I have created a sample solution in which the issue I am facing is reproduced. More specifically, I create a report, and when I try to preview the report, the following error appears in the console:

Uncaught (in promise) TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))
    at Array.from (<anonymous>)
    at ParametersArea.allParametersAutoRefresh (telerikReportViewer-19.1.25.521.js:5141:26)
    at ParametersArea.showPreviewButton (telerikReportViewer-19.1.25.521.js:5138:12)
    at w.<anonymous> (telerikReportViewer-19.1.25.521.js:5396:13)
    at w.<anonymous> (telerikReportViewer-19.1.25.521.js:374:43)
    at Generator.next (<anonymous>)
    at o2 (telerikReportViewer-19.1.25.521.js:25:20)

This issue occurs whether I use Kendo UI in combination with Telerik Reports or only Telerik Reports, according to the information described in your knowledge base.

Could you please check this, as I am interested in purchasing a subscription for both the Reports and Kendo UI?

1 Answer, 1 is accepted

Sort by
0
Petar
Telerik team
answered on 30 May 2025, 10:46 AM

Hello Spyros,

I believe I answered your concern in the private ticket 1688944. However, I will also share my response here in the forum thread, as it may be helpful to other customers who encounter the same issue.

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

TypeError: undefined is not iterable

The error occurs due to a breaking change introduced in the latest version, where the report viewer is no longer fully initialized immediately after the `$("#content").telerik_ReportViewer` call. Therefore, the reportViewer.reportSource call right after the initialization of the report viewer does not behave as expected. This change was not intended, and we will investigate it further to find a resolution. In the meantime, I recommend using the ready event of the report viewer, as this is when the report viewer is fully initialized:

    function getReport() {
        $("#content")
            .telerik_ReportViewer({
                serviceUrl: "api/reports",
                viewMode: telerikReportViewer.ViewModes.PRINT_PREVIEW,
                scaleMode: telerikReportViewer.ScaleModes.SPECIFIC,
                scale: 1,
                enableAccessibility: false,
                sendEmail: { enabled: false },

                pageReady: function (e, args) {
                    $("#telerikReportModalContainer").resize();
                },

                ready: function (e, args) {
                    let reportViewer = $("#content").data("telerik_ReportViewer");

                    if (reportViewer !== undefined) {
                        reportViewer.reportSource({
                            report: 'Report1',
                            parameters: {
                                Parameter1: "hello world"
                            },
                        });

                        reportViewer.refreshReport();
                    }
                }
            });
    }

Broken UI

In addition to the client-side error, I also noticed that the user interface of the page is broken, as it misses essential styles required for the correct appearance. For example, a reference to a Kendo UI theme is required for this:

    <link rel="stylesheet" href="https://kendo.cdn.telerik.com/themes/10.2.0/default/default-ocean-blue.css" />
    <style>
        #content {
            position: relative;
            height: 1000px;
            width: 1000px;
        }
    </style>

The additional styles added can be adjusted based on your preferences. You may also choose to use a different Kendo UI theme.

Wrapping up

I hope this helps. If you continue to experience any issues even after applying the above changes, please let me know, and I will be happy to assist you further.

Regards,
Petar
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Christos
Top achievements
Rank 1
commented on 05 Jun 2025, 11:51 AM

Hello,

Do you have an estimate on when this "not-intended" issue will be resolved?

Petar
Telerik team
commented on 10 Jun 2025, 10:06 AM

Hello Christos,

As of now, we cannot provide a specific date for when this will be fixed.

That said, I have logged an item regarding it in our public feedback portal:

This way, you will be automatically subscribed to any updates regarding the resolution's progress.

In the meantime, as I mentioned earlier, we recommend utilizing the `ready` event of the report viewer, as it ensures that the report viewer is fully initialized.

If you encounter any obstacles that prevent you from implementing the logic within this event handler, or if the fix does not work for you, it would be very helpful if you could provide further details, as this will help us consider all factors when addressing the issue. Thank you!

Tags
Report Viewer - HTML5
Asked by
Spyros
Top achievements
Rank 1
Answers by
Petar
Telerik team
Share this question
or