Error Reportviewer 14.0.0.0 Window.$Rsjquery

Asked

Viewed 292 times

1

When you click the button to expand groups in reportview, it keeps clicking 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();
     });
}

inserir a descrição da imagem aqui

1 answer

1


This is happening because the Reportviewer depends on the $Rsjquery at the time of displaying the 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 the Reportviewer depends on whether they are registered on the Page at the time of their display.

Remember to call

Imports Microsoft.Reporting.WebForms

And add the following CSS

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.