locked
crystal report RRS feed

  • Question

  • User-323690796 posted

    crystal report export to doc format is it available 

    Friday, February 27, 2009 4:40 AM

All replies

  • User693891686 posted

    Yes,

    We can export the crystal report to the following formats:

    1. PDF

    2. Excel

    3. Word

    4. RTF

    5. Crystal Report

    Friday, February 27, 2009 7:58 AM
  • User169451235 posted

    Hi.. 

     In asp.net with C#,  it could be done like....

    CrystalDecisions.Web.CrystalReportSource abc = new CrystalDecisions.Web.CrystalReportSource();

     abc.ReportDocument.ExportToHttpResponse(CrystalDecisions.Shared.ExportFormatType.WordForWindows, Response, true, "report_name");

     

    ---------------------------------------------------------------------

    please mark as answer if post helps you..!![:)]

    Saturday, February 28, 2009 6:42 AM
  • User-269404413 posted
    divya voruganti

    CR support Word, Excel, PDF, CrystalReport, Tiff, Web Archieve, XML, TXT.

    Monday, March 2, 2009 8:44 AM
  • User77861906 posted

    SqlConnection con = new SqlConnection("Data Source=.;Initial Catalog=Dbname;Integrated Security=true");
                SqlDataAdapter da = new SqlDataAdapter("select * FROM Tablename", con);
                DataSet ds = new DataSet();
                da.Fill(ds);
                CrystalDecisions.CrystalReports.Engine.ReportDocument RC;
                RC = new CrystalReport1();
                RC.SetDataSource(ds.Tables[0]);
                crystalReportViewer1.ReportSource = RC;

                CrystalDecisions.CrystalReports.Engine.ReportClass rc =  (CrystalDecisions.CrystalReports.Engine.ReportClass)RC ;
               
               
                SaveFileDialog sa = new SaveFileDialog();
                sa.OverwritePrompt = true;
                sa.Filter = "Adobe PDF (*.pdf)|*.pdf|Excel file (*.xls)|*.xls";
                sa.FileName = "abc";
                DialogResult dr = sa.ShowDialog();

                if (dr == DialogResult.OK)
                {
                    //rc.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.Excel, sa.FileName );

                    switch (sa.FilterIndex)
                    {
                        case 2:
                            rc.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.Excel, sa.FileName);
                            //rc.ExportToHttpResponse(CrystalDecisions.Shared.ExportFormatType.Excel, sa.FileName,true,"");
                            //ExportMessage = "Excel file: " + dia.FileName;
                            break;
                        case 1:
                            rc.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, sa.FileName );
                            //ExportMessage = "Adobe PDF file: " + dia.FileName;
                            break;
                        default:
                            break;
                    }


                    sa.Reset();

                }

    Saturday, December 25, 2010 2:41 AM