FlexReport for WPF
レポートのエクスポート

レポートを印刷するのではなく、ファイルにエクスポートして、クライアントや同僚に電子メールで配布する場合もあります。デザイナは、次のエクスポート形式をサポートしています。

形式 説明
ページ化 HTML(*.html) レポート内のページごとに 1 つの HTML ファイルを作成します。HTML ページには、ユーザーがレポート内を移動するためのリンクが含まれます。
プレーン HTML(*.html) ドリルダウン機能を持たない 1 つの HTML ファイルを作成します。
非埋め込み(リンク)フォントを使用した PDF(*.pdf) Adobe の Acrobat ビューアまたはブラウザプラグインを備えたコンピュータ上で表示できる PDF ファイルを作成します。
埋め込みフォントを使用した PDF/A(*.pdf) 可搬性の高い埋め込みフォント情報を含む PDF ファイルを作成します。
RTF(*.rtf) 一般的なワードプロセッサ(Microsoft Word や WordPad)で開くことができる RTF ファイルを作成します。これは、ページ付き XML ドキュメントまたは Open XML ドキュメントとして保存できます。
Microsoft Excel 97(*.xls) Microsoft Excel で開くことができる XLS ファイルを作成します。
Microsoft Excel 2007/2010 Open XML(*.xlsx) Microsoft Excel 2007 以降で開くことができる XLS ファイルを作成します。
Open XML Word(*.docx) Microsoft Word 2007 以降で開くことができる DOCX ファイルを作成します。
圧縮メタファイル(*.zip) EmfOnly、EmfPlusOnly、および EmfPlusDual 型の圧縮メタファイルを作成します。
TIFF(*.tiff)、BMP、PNG、JPEG、GIF 画像 TIFF(Tag Image File Format)、BMP(Bitmap Images)、PNG(Portable Network Graphic)、JPEG、または GIF 型の画像ファイルを作成します。

Export to PDF

The following code describes how to export a FlexReport to PDF using PdfFilter class.

C#
コードのコピー
// PDfフィルタを作成します
PdfFilter filter = new PdfFilter();
// ShowOPtionsをfalseに設定して、「オプションの表示」ダイアログを表示しないようにします
filter.ShowOptions = false;
// 保存されたPDFファイルのファイル名
filter.FileName = "testPDF.pdf";
report.RenderToFilter(filter);
Process.Start("testPDF.pdf");

Export to Image

The following code describes how to export a FlexReport to PDF using ImageFilter class.

C#
コードのコピー
// 同様に、TIFF、PNG、JPEG、GIFを使用できます
// Bitmapフィルタを作成します
BmpFilter filter = new BmpFilter();
// UseZipForMultipleFilesをtrueに設定して、zipファイル内のすべての画像を取得します
filter.UseZipForMultipleFiles = true;
// ファイル名を指定します
filter.FileName = "bmpExport.zip";
report.RenderToFilter(filter);
Process.Start(Directory.GetCurrentDirectory());

Export to HTML

The following code describes how to export a FlexReport to PDF using HtmlFilter class.

C#
コードのコピー
// Htmlフィルタを作成します
HtmlFilter filter = new HtmlFilter();
// ファイル名を指定します
filter.FileName = "htmlExport.html";
report.RenderToFilter(filter);
Process.Start("htmlExport.html");

Export to Paged HTML

The following code describes how to export a FlexReport to PDF using HtmlFilter class, and by setting the Paged property to true.

C#
コードのコピー
// HTMlフィルタを作成します
HtmlFilter filter = new HtmlFilter();
//set page = true for paged html
filter.Paged = true;
// ファイル名を指定します
filter.FileName = "pagedhtmlExport.html";
report.RenderToFilter(filter);
Process.Start("pagedhtmlExport.html");

Export to RTF

The following code describes how to export a FlexReport to PDF using RtfFilter class.

C#
コードのコピー
// RTFフィルタを作成します
RtfFilter filter = new RtfFilter();
// ファイル名を指定します
filter.FileName = "rtfExport.rtf";
report.RenderToFilter(filter);
Process.Start("rtfExport.rtf");

Export to XLS

The following code describes how to export a FlexReport to PDF using XlsFilter class, and set the OpenXml property to false.

C#
コードのコピー
// XLSフィルタを作成します
XlsFilter filter = new XlsFilter();
// ファイル名を指定します
filter.FileName = "xlsExport.xls";
// XLS形式のOpenXMLをfalseに設定します
filter.OpenXml = false;
report.RenderToFilter(filter);
Process.Start("xlsExport.xls");

Export to XLSX

The following code describes how to export a FlexReport to PDF using XlsFilter class, and set the OpenXml property to True.

C#
コードのコピー
// XLSフィルタを作成します
XlsFilter filter = new XlsFilter();
// ファイル名を指定します
filter.FileName = "xlsxExport.xlsx";
// XLSX形式の場合はopenxmlをtrueに設定します
filter.OpenXml = true;
report.RenderToFilter(filter);
Process.Start("xlsxExport.xlsx");

Export to DOCX

The following code describes how to export a FlexReport to PDF using RtfFilter class, and set the OpenXml property to True.

C#
コードのコピー
// RTFフィルタを作成します
RtfFilter filter = new RtfFilter();
//set openXML to true for DOCX format
filter.OpenXml = true;
// ファイル名を指定します
filter.FileName = "docxExport.docx";
report.RenderToFilter(filter);
Process.Start("docxExport.docx");

Export to MetaFile

The following code describes how to export a FlexReport to PDF using MetafileFilter class.

C#
コードのコピー
// MetafileFilterフィルタを作成します
MetafileFilter filter = new MetafileFilter();
// ファイル名を指定します
filter.FileName = "metaExport.zip";
report.RenderToFilter(filter);
Process.Start("metaExport.zip");