开发者

Export Report as Record Style in C# .Net

开发者 https://www.devze.com 2023-01-10 15:31 出处:网络
I need to Export a report as a Record开发者_开发百科Style columns without spaces in C#.Net I\'m not sure what .dll I need to add in.currently in the CrystalDecisions.Shared.dll there is an ExportForma

I need to Export a report as a Record开发者_开发百科Style columns without spaces in C#.Net I'm not sure what .dll I need to add in. currently in the CrystalDecisions.Shared.dll there is an ExportFormatType Enum but it does not contain an option for RecordStyle. I have seen places where you can use Constants crEFTRecordStyle but not sure where that comes from. any help would be appreciated. Thanks!


I got this to work.

Posting Answer here in case anyone else runs into the same issue.

Needed to Add CRAXDRT.dll as a reference to my project.

CRAXDRT.Report report = new Report();
CRAXDRT.Application app = new Application();
report = app.OpenReport("ReportName.rpt", OpenReportMethod.OpenReportByDefault);

report.ExportOptions.DestinationType = CRExportDestinationType.crEDTDiskFile;
report.ExportOptions.DiskFileName = "C:\SaveReportAs.txt";
report.ExportOptions.FormatType = CRExportFormatType.crEFTRecordStyle;
report.Export(false);

0

精彩评论

暂无评论...
验证码 换一张
取 消