Error ReportViewer 14.0.0.0 Window. $ RSjQuery

0

By clicking the button to expand groups in reportview, it will load forever and gives error in the line below:

// error Uncaught TypeError: window.$RSjQuery is not a function

if ($) {
     window.$RSjQuery(window).on("resize", function () {
         self.ResizeToolbarIcons();
     });
}

    
asked by anonymous 29.04.2018 / 21:51

1 answer

0

This is occurring because the ReportViewer relies on $ RSjQuery when displaying ToolBar .

Add the following line of code in the Page_Load or Pre_Render event

    If Not Page.IsPostBack Then
        Me.Page.Controls.OfType(Of HtmlForm).First().Controls.Add(New ReportViewer With {.ID = "rdlcRSQuery", .Width = 0, .Height = 0)
    End If 

This will make the Scripts that ReportViewer dependent on are registered to the Page at the time of its display.

Remember to call

Imports Microsoft.Reporting.WebForms

And add the following CSS

<style type="text/css">
    #rdlcRSQuery_ReportViewer { display:none;}
</style> 
    
30.07.2018 / 23:22