[CLOSED] Unable to load ssrs report on button click in 2.2

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] Unable to load ssrs report on button click in 2.2

    -- Having requirement of loading local report with dynamic .rdlc file on button click event but it is not loading the report except the report toolbar (as in attached image)

    -- does anyone know the reason behind not showing report in button click

    we have checked in version 1.0 but it will not work so we have cheked in version 2.2 and in version 2.2 it also not work

    here is code
    Page -> .aspx (in ext.net)

    <body>
        <form id="form1" runat="server">
        <div>
    
            <ext:ResourceManager ID="rm1" runat="server">
            </ext:ResourceManager>
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
            <ext:Viewport runat="server" Layout="BorderLayout">
                <Items>
                    <ext:Panel ID="pnl" runat="server" Region="Center">
                        <Items>
                            <ext:Button ID="btn" runat="server" Text="Show Report">
                                <DirectEvents>
                                    <Click OnEvent="btn_Click">
                                    </Click>
                                </DirectEvents>
                            </ext:Button>
                        </Items>
                        <Content>
                            <rsweb:ReportViewer ID="ReportViewer1" Width="100%" runat="server">
                            </rsweb:ReportViewer>
                        </Content>
                    </ext:Panel>
                </Items>
            </ext:Viewport>
        </div>
        </form>
    </body>

    page behind code -> .aspx.cs
    
    protected void btn_Click(object sender, DirectEventArgs e)
            {
                try
                {
                    ReportDataSource dsReport = new ReportDataSource();
                    dsReport.Name = "Report1";
                    dsReport.Value = GetData().Tables["1"];
                    ReportViewer1.Reset();
                    
    
                    ReportViewer1.LocalReport.DataSources.Add(dsReport);
                    ReportViewer1.LocalReport.DisplayName = "Report1";
                    ReportViewer1.LocalReport.LoadReportDefinition(GetReportDef(GetData().Tables["1"], dsReport.Name));
                    ReportViewer1.Update();
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }
    attached screenshot with this post
    (report-in-ext.net.JPG)

    working the same in asp.net

    .aspx (in asp.net)
    <body>
        <form id="form1" runat="server">
        <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
            
            <asp:Button ID="btn1" runat="server" OnClick="btn_Click" Text="Show Report"/>
    
            <rsweb:ReportViewer ID="ReportViewer1" Width="100%" runat="server">
            </rsweb:ReportViewer>
        </div>
        </form>
    </body>
    .aspx.cs
    protected void btn_Click(object sender, EventArgs e)
            {
                try
                {
                    ReportDataSource dsReport = new ReportDataSource();
                    dsReport.Name = "Report1";
                    dsReport.Value = GetData().Tables["1"];
                    ReportViewer1.Reset();
                    
    
                    ReportViewer1.LocalReport.DataSources.Add(dsReport);
                    ReportViewer1.LocalReport.DisplayName = "Report1";
                    ReportViewer1.LocalReport.LoadReportDefinition(GetReportDef(GetData().Tables["1"], dsReport.Name));
                    ReportViewer1.Update();
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }
    Attached Thumbnails report-in-ext.net.JPG  
    Last edited by Daniil; Aug 15, 2013 at 11:31 AM. Reason: [CLOSED]

Similar Threads

  1. [CLOSED] Unable to load ssrs report
    By legaldiscovery in forum 1.x Premium Help
    Replies: 5
    Last Post: Aug 12, 2013, 5:56 AM
  2. Replies: 1
    Last Post: Oct 02, 2012, 2:30 PM
  3. Replies: 1
    Last Post: Oct 12, 2010, 9:39 PM
  4. Replies: 9
    Last Post: Jul 02, 2010, 2:10 PM
  5. Replies: 4
    Last Post: Dec 07, 2009, 2:46 PM

Posting Permissions