Quantcast
Viewing all articles
Browse latest Browse all 1507

Export to CSV and PDF.

Without having to re-load the Crystal Report. Is there a way to export the CrystalReportViewer to a PDF or CSV file. I've seen code that you have to create a new instance and then you have to pass all the parameters over again,  but the report is already displayed in the CrystaReportViewer, so why would you have to re-create it all over again?

I have this so far;

                       <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="True"
                            DisplayGroupTree="False" DisplayToolbar="False" EnableDatabaseLogonPrompt="False"
                            EnableParameterPrompt="False" ReuseParameterValuesOnRefresh="True" ReportSourceID="CrystalReportSource1"
                            Style="text-align: left" BestFitPage="False" BackColor="#ECE9D8" Visible="False" />
                        <CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
                            <Report FileName="~\Reports\cryVls1a34.rpt">
                            </Report>
                        </CR:CrystalReportSource>

                                    <asp:DropDownList ID="ddlEportFormat" runat="server" AutoPostBack="True">
                                      <asp:ListItem>-- Select Export Format --</asp:ListItem>
                                        <asp:ListItem>Portable Document (PDF)</asp:ListItem>
                                        <asp:ListItem>MS Word (DOC)</asp:ListItem>
                                        <asp:ListItem>MS Excel (XLS)</asp:ListItem>
                                        <asp:ListItem>Comma Seperated Values (CSV)</asp:ListItem>
                                    </asp:DropDownList>

When the user selects the file type, I want to export the crystal report.


Viewing all articles
Browse latest Browse all 1507

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>