欢迎来到天天文库
浏览记录
ID:37919890
大小:43.50 KB
页数:5页
时间:2019-06-02
《FastReport报表使用代码C#》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、usingSystem;usingSystem.Data;usingSystem.ComponentModel;usingFastReport;namespacecx{//////SummarydescriptionforFrxDataSet.///publicclassFrxDataTable:DataTable{privateintnItem;TfrxUserDataSetClassm_ds;privateDataTablem_ChildTable;publicnewstringTableName{g
2、et{returnm_ds.Name;}}publicIfrxDataSetFrxTable{get{returnm_dsasIfrxDataSet;}}privatevoidconstructor(stringname){m_ChildTable=null;m_ds=newTfrxUserDataSetClass();m_ds.OnCheckEOF+=newIfrxUserDataSetEvents_OnCheckEOFEventHandler(OnCheckEOFEventHandler);m_ds.OnGetValue+=newIfrx
3、UserDataSetEvents_OnGetValueEventHandler(OnGetValueHandler);m_ds.OnFirst+=newIfrxUserDataSetEvents_OnFirstEventHandler(OnFirstEventHandler);m_ds.OnNext+=newIfrxUserDataSetEvents_OnNextEventHandler(OnNextEventHandler);m_ds.OnPrior+=newIfrxUserDataSetEvents_OnPriorEventHandle
4、r(OnPriorEventHandler);m_ds.Name=name;DataColumnCollectioncols=Columns;cols.CollectionChanged+=newCollectionChangeEventHandler(ColumnsCollection_Changed);5纪兆亮自学FastReport}publicFrxDataTable(stringname){constructor(name);}publicFrxDataTable(DataTablet){constructor(t.TableNam
5、e);stringFieldNames=null;foreach(DataColumncolint.Columns)FieldNames+=col.Caption+"";m_ds.Fields=FieldNames;m_ChildTable=t;}//////Assignstabletoreport///publicvoidAssignToDataBand(stringBandName,TfrxReportClassreport){IfrxComponentfrx_component;((IfrxCo
6、mponent)report).FindObject(BandName,outfrx_component);((IfrxDataBand)frx_component).DataSet=(IfrxDataSet)m_ds;}//////Assignstabletoreport///publicvoidAssignToReport(boolEnable,TfrxReportClassreport){report.SelectDataset(Enable,m_ds);}//////OnFirs
7、teventhandler///privatevoidOnFirstEventHandler(){nItem=0;}//////OnNexteventhandler///privatevoidOnNextEventHandler()5纪兆亮自学FastReport{nItem++;}//////OnPriorevenehandler///privatevoidOnPriorEventHandler(){nItem--;}/////
8、/OncheckEndOfFileeventhandler///privatevoidOnCheckEOFEventHandler(outboo
此文档下载收益归作者所有