Why is my report viewer "loading"?

0

Hello, I have a report in vs 2017 and when executing it in the browser it stays stuck, here I leave the code:

<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <rsweb:ReportViewer ID="ReportViewer1" runat="server" BackColor="" ClientIDMode="AutoID" DocumentMapWidth="100%" HighlightBackgroundColor="" 
        InternalBorderColor="204, 204, 204" InternalBorderStyle="Solid" InternalBorderWidth="1px" LinkActiveColor="" LinkActiveHoverColor="" 
        LinkDisabledColor="" PrimaryButtonBackgroundColor="" PrimaryButtonForegroundColor="" PrimaryButtonHoverBackgroundColor="" 
        PrimaryButtonHoverForegroundColor="" SecondaryButtonBackgroundColor="" SecondaryButtonForegroundColor="" 
        SecondaryButtonHoverBackgroundColor="" SecondaryButtonHoverForegroundColor="" SplitterBackColor="" ToolbarDividerColor="" 
        ToolbarForegroundColor="" ToolbarForegroundDisabledColor="" ToolbarHoverBackgroundColor="" ToolbarHoverForegroundColor="" 
        ToolBarItemBorderColor="" ToolBarItemBorderStyle="Solid" ToolBarItemBorderWidth="1px" ToolBarItemHoverBackColor="" 
        ToolBarItemPressedBorderColor="51, 102, 153" ToolBarItemPressedBorderStyle="Solid" ToolBarItemPressedBorderWidth="1px" 
        ToolBarItemPressedHoverBackColor="153, 187, 226" Height="100%" Width="100%">
        <LocalReport ReportPath="Reportes\Report1.rdlc">
        </LocalReport>
    </rsweb:ReportViewer>

using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["cn"].ToString()))
{
    SqlCommand cmd = new SqlCommand("SELECT * from tabla where cod_user='"+Session["cod_user"]+"'", con);
    using (SqlDataAdapter da = new SqlDataAdapter(cmd))
    {
        DataTable t = new DataTable();
        da.Fill(t);
        ReportDataSource datasource = new ReportDataSource("DataSet1", t);
        ctl00.LocalReport.DataSources.Add(datasource);
        ctl00.LocalReport.ReportPath = Server.MapPath("~/Reportes/Report1.rdlc");
        ctl00.LocalReport.Refresh();
    }
}

    
asked by sunflower 29.03.2018 в 19:42
source

0 answers