cancel
Showing results for 
Search instead for 
Did you mean: 

【CrystalReports】レポートのエクスポートについて

Former Member
0 Kudos

開発言語:visualstudio2012 vb.net

バージョン:CrystalReports2013

CrystalReportsのレポートのエクスポート機能を利用しております。

レポートのエクスポートのダイアログで「ファイルの種類」の初期値が

「Crystal Reports(*.rpt)」となっています。


この「ファイルの種類」の初期値を「Microsoft Excel(*.xls)」に変更したいのですが、

その方法が分かりません。

ご存じの方がおりましたら是非回答をお願いします。

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member186271
Participant
0 Kudos

でも、以下のソースをご参照ください。

// Declare variables and get the export options.

ExportOptions exportOpts = new ExportOptions();

ExcelFormatOptions excelFormatOpts = new ExcelFormatOptions ();

DiskFileDestinationOptions diskOpts = new DiskFileDestinationOptions();

exportOpts = Report.ExportOptions;

// Set the excel format options.

excelFormatOpts.ExcelUseConstantColumnWidth = true;
exportOpts.ExportFormatType = ExportFormatType.Excel;
exportOpts.FormatOptions = excelFormatOpts;

// Set the disk file options and export.

exportOpts.ExportDestinationType = ExportDestinationType.DiskFile;

diskOpts.DiskFileName = fileName;

exportOpts.DestinationOptions = diskOpts;

Report.Export ();

以上、

Jeff。

former_member186271
Participant
0 Kudos

そのような方法が御座いません。

Jeff。