“恋”是个很强悍的字。它的上半部取自“变态”的“变”,下半部取自“变态”的“态”。ehlibv5在delphi下的安装e:\ehlib5文件夹下的文件拷贝到e:\ehlib5下,把e:\ehlib5加入到lib:Tools->Options->DelphiOptions->Library-Win32->LibraryPath)."File\Open...",并编译;,并编译;、安装:,:即:用"File\Open...",,编译、安装;In"Package..."pile"->EnvironmentOptions->Library->LibraryPath中添入EHLIB路径。,编译一下,但不要安装。,编译,,编译并安装。。,编译并运行,测试安装成功。以下是EHLIB的导出代码:(其实EHLIB的DEMO1中已有)procedure(Sender:TObject);varExpClass:TDBGridEhExportClass;Ext:String;begin:='file1';if(ActiveControlisTDBGridEh)thenifthenbegincaseof1:beginExpClass:=TDBGridEhExportAsText;Ext:='txt';end;2:beginExpClass:=TDBGridEhExportAsCSV;Ext:='csv';end;3:beginExpClass:=TDBGridEhExportAsHTML;Ext:='htm';end;4:beginExpClass:=TDBGridEhExportAsRTF;Ext:='rtf';end;5:beginExpClass:=TDBGridEhExportAsXLS;Ext:='xls';end;elseExpClass:=nil;Ext:='';end;ifExpClass<>nilthenbeginifUpperCase(Copy(,Length()-2,3))<>UpperCase(Ext)then:=+'.'+Ext;SaveDBGridEhToExportFile(ExpClass,TDBGridEh(ActiveControl),,False);end;end;end;//功能:设定DbGridEh合计行信息//参数:pDbGrid:TDBGridEh;//pcFields:string;字段列表,字段用逗号分隔//pvtType:TFooterValueType;统计类型TFooterValueType=(fvtNon,fvtSum,fvtAvg,fvtCount,fvtFieldValue,fvtStaticText);//引用://例如:DbGridEhFoot(DbGridEh1,´Number,Sum´,fvtSum);设定数量和金额字段为合计统计//--------------------------------------------------------------------------------ProcedureDbGridEhFoot(pDbGrid:TDBGridEh;pcFields:string;pvtType:TFooterValueType);varnFldLoop:integer;cFieldName:string;tmpFldList:TStrings;begin:=1;//指定网格尾部统计行行数:=true;//激活统计:=clBtnFace;//指定统计行颜色tmpFldList:=;StrToStringList(Uppercase(pcFields),´,´,tmpFldList);//将字符串转换为串列表FornFldLoop:=0to-1dobegincFieldName:=[nFldLoop].FieldName;//网格列字段名if(uppercase(cFieldName))>=0thenbegin[nFldLoop].:=pvtType;//统计类型end;end;;end;一、如何在程序中确定Ehlib定义的报表表头颜色?在执行打印之前,加上下面的语句::=clLime;//clLime可以换成你想要的颜色比如clRed是红色等等:=[pghColored,pghFitingByColWidths];//方括号里的"pghColored"是必需的,其它的根据你的需要决定取舍================
EhLib使用说明 来自淘豆网m.daumloan.com转载请标明出处.