Click here to Skip to main content
15,891,316 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
pls someone help me.
It shows report first time well but after that when i am changing the operations through update panel it refresh the report but show only blank report. But when i am exporting the report it shows me proper report.

My code is :
<asp:UpdatePanel ID="updatepnl_main" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
<triggers> <asp:AsyncPostBackTrigger ControlID="btn_save" EventName="Click" />
<asp:PostBackTrigger ControlID="CrystalReportViewer1" />
<contenttemplate>

<asp:Panel ID="pnl_add" runat="server" CssClass="ModalPopupPanel" Width="600px">


.............
XML
<table id="tab1" runat="server">
                  <tr>
                      <td>
                           <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server"  ViewStateMode="Enabled"
                           AutoDataBind="true"   Height="50px" ReportSourceID="CrystalReportSource1" Width="350px" />
          <CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
              <Report FileName="employee.rpt"></Report>
         </CR:CrystalReportSource>
                     </td>
                  </tr>
              </table>
          </ContentTemplate>

      </asp:UpdatePanel>



Aspx.cs code is :
C#
CrystalReportSource1.Report.FileName="";
            CrystalReportSource1.Report.FileName = "employee.rpt";
            CrystalReportSource1.ReportDocument.Database.Tables[0].SetDataSource(dt);
            CrystalReportSource1.DataBind();
            upd_grid.Update();
Posted
Updated 11-May-15 19:59pm
v2
Comments
Aniiil 21-Jul-15 8:01am    
Wow.... Is their no any person which have the answer for this question?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900