Eclipsed4utoo's Blog
Not Your Ordinary Programmer

Posts Tagged ‘Crystal Report Viewer’

ASP.Net – Crystal Report Viewer & AJAX

Fri ,31/07/2009

I ran across this issue with the Crystal Report Viewer not printing or exporting if it was inside of an AJAX UpdatePanel.  It seems that the Crystal Report Viewer is required to do a synchronous postback to be able to print or export.

You will need to add the Triggers as shown below to the UpdatePanel, or remove it from the UpdatePanel all together.

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
   <Triggers>
      <asp:PostBackTrigger ControlID="CrystalReportViewer1" />
   </Triggers>
   <ContentTemplate>
      <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="true" />
   </ContentTemplate>
</asp:UpdatePanel>