In this article I will explain with an example, how to solve the problem when the RDLC Report does not show any data and the RDLC Report keeps loading without showing data in ASP.Net.
In this problem, RDLC Report is stuck on loading and continuously displays the loading image.
 
 
The Problem
The RDLC Report does not show any data and the RDLC Report keeps loading without showing data in ASP.Net. The below animated GIF image, describes the scenario.
RDLC Report keeps loading without showing data ASP.Net
 
 
The Cause
Below is the code for populating the RDLC Report from database. The last line in the code refreshes the RDLC report.
But since the Not IsPostBack condition is missing, the below code is executed always, making the RDLC Report simply keep refreshing and not showing the data.
C#
protected void Page_Load(object sender, EventArgs e)
{
    ReportViewer1.ProcessingMode = ProcessingMode.Local;
    ReportViewer1.LocalReport.ReportPath = Server.MapPath("~/Report.rdlc");
    Customers dsCustomers = GetData("select top 20 * from customers");
    ReportDataSource datasource = new ReportDataSource("Customers", dsCustomers.Tables[0]);
    ReportViewer1.LocalReport.DataSources.Clear();
    ReportViewer1.LocalReport.DataSources.Add(datasource);
    ReportViewer1.LocalReport.Refresh();
}
 
VB.Net
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
    ReportViewer1.ProcessingMode = ProcessingMode.Local
    ReportViewer1.LocalReport.ReportPath = Server.MapPath("~/Report.rdlc")
    Dim dsCustomers As Customers = GetData("select top 20 * from customers")
    Dim datasource As New ReportDataSource("Customers", dsCustomers.Tables(0))
    ReportViewer1.LocalReport.DataSources.Clear()
    ReportViewer1.LocalReport.DataSources.Add(datasource)
    ReportViewer1.LocalReport.Refresh()
End Sub
 
 
The Solution
In the below code, the required correction is done and the missing Not IsPostBack condition has been added.
C#
protected void Page_Load(object sender, EventArgs e)
{
    if (!this.IsPostBack)
    {
        ReportViewer1.ProcessingMode = ProcessingMode.Local;
        ReportViewer1.LocalReport.ReportPath = Server.MapPath("~/Report.rdlc");
        Customers dsCustomers = GetData("select top 20 * from customers");
        ReportDataSource datasource = new ReportDataSource("Customers", dsCustomers.Tables[0]);
        ReportViewer1.LocalReport.DataSources.Clear();
        ReportViewer1.LocalReport.DataSources.Add(datasource);
        ReportViewer1.LocalReport.Refresh();
    }
}
 
VB.Net
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
    If Not IsPostBack Then
        ReportViewer1.ProcessingMode = ProcessingMode.Local
        ReportViewer1.LocalReport.ReportPath = Server.MapPath("~/Report.rdlc")
        Dim dsCustomers As Customers = GetData("select top 20 * from customers")
        Dim datasource As New ReportDataSource("Customers", dsCustomers.Tables(0))
        ReportViewer1.LocalReport.DataSources.Clear()
        ReportViewer1.LocalReport.DataSources.Add(datasource)
        ReportViewer1.LocalReport.Refresh()
    End If
End Sub
 
Note: The complete code for populating the RDLC Report is available in my article, How to create RDLC report step by step in ASP.Net using C# and VB.Net.
 
 
Screenshot
RDLC Report keeps loading without showing data ASP.Net