本文介绍了使用记事本中的特定行中的每个报表记录将Crystal报表导出到记事本文件中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用C#编码生成一个cystal报告,我希望在Notepad文件中导出记事本文件的特定行中的每个Crystal Report记录。
我在做什么?
rptEmployeeOPRCreditReport SCR = new rptEmployeeOPRCreditReport();
SCR.SetDataSource(ds);
SCR.VerifyDatabase();
SCR.SetParameterValue( pKey,pKey);
SCR.SetParameterValue( WType,WType);
SCR.SetParameterValue( Reff,Reff);
SCR.SetParameterValue( dtFrom,StrStartDate);
SCR.SetParameterValue( dtTo,StrLastDate);
crystalReportViewer1.ReportSource = SCR;
ExportOptions ExOpt = new ExportOptions();
ExOpt.ExportFormatType = ExportFormatType.RichText;
ExOpt.ExportDestinationType = ExportDestinationType.DiskFile;
DiskFileDestinationOptions destination = new DiskFileDestinationOptions();
destination = ExportOptions.CreateDiskFileDestinationOptions();
string strFileName = OPR + strCurrentMonth + strCurrentYear + 。txt;
destination.DiskFileName = d:\\ + strFileName;
ExOpt.ExportDestinationOptions = destination;
SCR.Export(ExOpt);
它创建一个记事本文件但文件中的数据对我来说是不可理解的。 PLZ HELP ANY ONE。
解决方案
I am Generating a cystal Report in C# coding that i want to Export in Notepad File with each Crystal Report Record in Specific Row of Notepad file.
what i m doing is ?
rptEmployeeOPRCreditReport SCR = new rptEmployeeOPRCreditReport(); SCR.SetDataSource(ds); SCR.VerifyDatabase(); SCR.SetParameterValue("pKey", pKey); SCR.SetParameterValue("WType", WType); SCR.SetParameterValue("Reff", Reff); SCR.SetParameterValue("dtFrom", StrStartDate); SCR.SetParameterValue("dtTo", StrLastDate); crystalReportViewer1.ReportSource = SCR; ExportOptions ExOpt = new ExportOptions(); ExOpt.ExportFormatType = ExportFormatType.RichText; ExOpt.ExportDestinationType = ExportDestinationType.DiskFile; DiskFileDestinationOptions destination = new DiskFileDestinationOptions(); destination = ExportOptions.CreateDiskFileDestinationOptions(); string strFileName = "OPR" + strCurrentMonth + strCurrentYear + ".txt"; destination.DiskFileName = "d:\\" + strFileName; ExOpt.ExportDestinationOptions = destination; SCR.Export(ExOpt);
It Creates a Notepad File But the data in file is not Understandable to me. PLZ HELP ANY ONE.
解决方案
这篇关于使用记事本中的特定行中的每个报表记录将Crystal报表导出到记事本文件中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!