Export Report as Record Style in C# .Net
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);
精彩评论