<i id='rIpFJ'><tr id='rIpFJ'><dt id='rIpFJ'><q id='rIpFJ'><span id='rIpFJ'><b id='rIpFJ'><form id='rIpFJ'><ins id='rIpFJ'></ins><ul id='rIpFJ'></ul><sub id='rIpFJ'></sub></form><legend id='rIpFJ'></legend><bdo id='rIpFJ'><pre id='rIpFJ'><center id='rIpFJ'></center></pre></bdo></b><th id='rIpFJ'></th></span></q></dt></tr></i><div id='rIpFJ'><tfoot id='rIpFJ'></tfoot><dl id='rIpFJ'><fieldset id='rIpFJ'></fieldset></dl></div>

  • <legend id='rIpFJ'><style id='rIpFJ'><dir id='rIpFJ'><q id='rIpFJ'></q></dir></style></legend>
  • <small id='rIpFJ'></small><noframes id='rIpFJ'>

    <tfoot id='rIpFJ'></tfoot>

          <bdo id='rIpFJ'></bdo><ul id='rIpFJ'></ul>

        使用水晶报表导出为pdf文件

        时间:2023-07-10

        <small id='Xvasx'></small><noframes id='Xvasx'>

              <bdo id='Xvasx'></bdo><ul id='Xvasx'></ul>

              <i id='Xvasx'><tr id='Xvasx'><dt id='Xvasx'><q id='Xvasx'><span id='Xvasx'><b id='Xvasx'><form id='Xvasx'><ins id='Xvasx'></ins><ul id='Xvasx'></ul><sub id='Xvasx'></sub></form><legend id='Xvasx'></legend><bdo id='Xvasx'><pre id='Xvasx'><center id='Xvasx'></center></pre></bdo></b><th id='Xvasx'></th></span></q></dt></tr></i><div id='Xvasx'><tfoot id='Xvasx'></tfoot><dl id='Xvasx'><fieldset id='Xvasx'></fieldset></dl></div>

                <tbody id='Xvasx'></tbody>

              • <tfoot id='Xvasx'></tfoot>

                  <legend id='Xvasx'><style id='Xvasx'><dir id='Xvasx'><q id='Xvasx'></q></dir></style></legend>
                  本文介绍了使用水晶报表导出为pdf文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我这里有代码示例,我可以直接保存为 PDF 文件,但我想做的是向客户端显示第一个 pdf 文件,并允许用户保存它.我如何做到这一点?

                  I have code sample here, I can save as a PDF file directly but what I want to do is to show client first pdf file, and allow users to save it. How do I achieve this?

                  ReportDocument rpt = new ReportDocument();
                  rpt.Load(@"C:CrystalReport2.rpt");
                  
                  rpt.SetDataSource(datatablesource);
                  
                  ExportOptions rptExportOption;
                  DiskFileDestinationOptions rptFileDestOption = new DiskFileDestinationOptions();
                  PdfRtfWordFormatOptions rptFormatOption = new PdfRtfWordFormatOptions();
                  string reportFileName = @"C:SampleReport.pdf";
                  rptFileDestOption.DiskFileName = reportFileName;
                  rptExportOption = rpt.ExportOptions;
                  {
                      rptExportOption.ExportDestinationType = ExportDestinationType.DiskFile;
                      //if we want to generate the report as PDF, change the ExportFormatType as "ExportFormatType.PortableDocFormat"
                      //if we want to generate the report as Excel, change the ExportFormatType as "ExportFormatType.Excel"
                      rptExportOption.ExportFormatType = ExportFormatType.PortableDocFormat;
                      rptExportOption.ExportDestinationOptions = rptFileDestOption;
                      rptExportOption.ExportFormatOptions = rptFormatOption;
                  }
                  
                  rpt.Export();
                  

                  推荐答案

                  ExportOptions CrExportOptions ;
                  DiskFileDestinationOptions CrDiskFileDestinationOptions = new DiskFileDestinationOptions();
                  PdfRtfWordFormatOptions CrFormatTypeOptions = new PdfRtfWordFormatOptions();
                  CrDiskFileDestinationOptions.DiskFileName = "C:\SampleReport.pdf";
                  CrExportOptions = doc.ExportOptions;
                  {
                      CrExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
                      CrExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat;
                      CrExportOptions.DestinationOptions = CrDiskFileDestinationOptions;
                      CrExportOptions.FormatOptions = CrFormatTypeOptions;
                  }
                  doc.Export();
                  

                  这样的代码............

                  Code like this...........

                  这篇关于使用水晶报表导出为pdf文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:无法加载文件或程序集'CrystalDecisions.ReportAppServer.CommLayer,版本 下一篇:CrystalReport 加载报告失败

                  相关文章

                  1. <tfoot id='WC9GJ'></tfoot>
                  2. <small id='WC9GJ'></small><noframes id='WC9GJ'>

                    • <bdo id='WC9GJ'></bdo><ul id='WC9GJ'></ul>

                  3. <i id='WC9GJ'><tr id='WC9GJ'><dt id='WC9GJ'><q id='WC9GJ'><span id='WC9GJ'><b id='WC9GJ'><form id='WC9GJ'><ins id='WC9GJ'></ins><ul id='WC9GJ'></ul><sub id='WC9GJ'></sub></form><legend id='WC9GJ'></legend><bdo id='WC9GJ'><pre id='WC9GJ'><center id='WC9GJ'></center></pre></bdo></b><th id='WC9GJ'></th></span></q></dt></tr></i><div id='WC9GJ'><tfoot id='WC9GJ'></tfoot><dl id='WC9GJ'><fieldset id='WC9GJ'></fieldset></dl></div>
                    <legend id='WC9GJ'><style id='WC9GJ'><dir id='WC9GJ'><q id='WC9GJ'></q></dir></style></legend>