This is a migrated thread and some comments may be shown as answers.

Update Panel with Crystal Report Viewer Problem

1 Answer 489 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ronak
Top achievements
Rank 1
Ronak asked on 18 May 2011, 01:41 PM
Hi,

I am currently working with crystal report & i am using crystal report viewer & crystal report source. Crystal report viewer & Crystal report source that  i put in update panel because when we press "Next" button ( i.e crystal report viewer property ) it doesn't allow post back to page. But problem will occur when i press Export Option ( i.e crystal report viewer property )  to select file formate (PDF), will not be opened due to update panel.
I have already done  Research & development  on it  & i found one solution & i.e.  fire trigger (like below). 
<asp:PostBackTrigger ControlID="CrystalReportViewer1"  />


Page will be post back (that i don't want) & pop up export option (that i want), when i am going to write  this trigger "<asp:PostBackTrigger ControlID="CrystalReportViewer1"  />" . So if i do it like this it is not good for my project that each & every time postback.
 
If any one knows better option that while pressing next button page will not going to be postback every time and Export option (of crystal report viewer ) will pop up. Is there any script for it or other option.

Thank you,
Ronak

Code:
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true"  >

          <Triggers>
           <asp:AsyncPostBackTrigger ControlID="btnCreateReport" EventName="Click" />
           <asp:PostBackTrigger ControlID="CrystalReportViewer1"  />
         </Triggers>

        <ContentTemplate>
        <div style="float: left;padding-left:30px;width:95%">
        <fieldset class="field">
                 <legend style="font-family: Calibri; color :Teal   ">Reports</legend> 
         <table width = "100%"  >
                 
                      <tr>
                          <td width = "20%">
                          
                              <asp:Label ID="lblCreatePreProcessing" runat="server" Font-Names="Calibri" 
                                  Text="Create Preprocessing Report :"></asp:Label>
                          
                              </td>
                              <td width = "80%">
                                  <asp:RadioButtonList ID="radbtnlistCreatePreProcessing" runat="server" 
                                      RepeatDirection="Horizontal" Font-Names="Calibri">
                                      <asp:ListItem>Yes</asp:ListItem>
                                      <asp:ListItem>No</asp:ListItem>
                                  </asp:RadioButtonList>
                              </td>
                              
                      </tr>
                 
                      <tr>
                          <td>
                              <asp:Label ID="lblError" runat="server"></asp:Label>
                          </td>
                      </tr>
                 
                      <tr>
                          <td>
                              <asp:Button ID="btn1" runat="server" Text="Button" />
                              &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
                              <asp:Button ID="btn2" runat="server" Text="Button" />
                          </td>
                              <td>
                              
                                  &nbsp;</td>
                      </tr>
                 
                      <tr>
                          <td align="center" width="100%">
                          <asp:Button ID="btnCreateReport" runat="server" Text="Generate Report" ValidationGroup="Save"
                           CssClass="ButtonClass" Width="150px"  Height="40px" Font-Names="Calibri" 
                                  Font-Size="Medium"  />
                                  &nbsp&nbsp&nbsp
                                  <asp:Button ID="btnCloseReport" runat="server" Text="Close Report" ValidationGroup="Save"
                           CssClass="ButtonClass" Width="150px"  Height="40px" Font-Names="Calibri" 
                                  Font-Size="Medium"  />
                        
                        <%--<asp:Button ID = "btnCreateReport" Text = "Create Report" runat = "server" />--%>
                        
                              &nbsp;&nbsp;
                        
                       
                         
                        
                          </td>
                      </tr>
                 
                      <tr>
                        <td align ="center"   width= "100%" >
                        
                            &nbsp;</td>
                      
                      </tr>      
                 
                 
                 </table>
                 <table width ="100%" >
                    <tr>
                    <td width ="2%">
                    
                    </td>
                    <td width = "2%">
                    
                    </td>
                    <td width = "2%">
                    
                    </td>
                    <td width = "2%">
                    
                    </td>
                     <td width = "82%">
                         
                      <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" 
                AutoDataBind="true"    EnableViewState="True" Height="50px" Width="350px" 
                             HasGotoPageButton="False" HasViewList="False"   />
                
              <CR:CrystalReportSource ID="CrystalReport21" runat="server">
              <Report FileName="Reports\xyz.rpt">
              
              </Report>
              </CR:CrystalReportSource> 

                     </td>
                   </tr>
                 </table>
                        
      </fieldset>
    </div>    
    
   </ContentTemplate>
</asp:UpdatePanel>















1 Answer, 1 is accepted

Sort by
0
Vinkel
Top achievements
Rank 1
answered on 18 May 2011, 02:02 PM
I see no telerick controls in code, Ronak, only MS. Contact microsoft if needed.
Tags
General Discussions
Asked by
Ronak
Top achievements
Rank 1
Answers by
Vinkel
Top achievements
Rank 1
Share this question
or