53.3、报表插件,简单账表,不通过插件,创建临时表原创
15人赞赏了该文章
1.1万次浏览
编辑于2020年07月14日 22:17:38
续
上一节通过插件创建临时表,本节不通过插件创建临时表
1、添加类 POOrderDetailt2.cs
2、复制代码,请参考最下面附件
3、引用,使用,继承和上一节一样
4、//上一节 this.IsCreateTempTableByPlugin = false; //本节this.IsCreateTempTableByPlugin = true;
5、获取过滤条件信息(构造单据信息),组织名称,基础资料名称,设置单据列和上一节一样
6、
//创建临时报表 public override void BuilderReportSqlAndTempTable(IRptParams filter, string tableName) { }
7、取消勾选上一节的插件,注册本节插件
8、断点调式,找执行的sql
/*dialect*/ select FID, FENTRYID,FPURCHASEORGID,FOrgname,FSuppName,FBILLNO,FDate,FDOCUMENTSTATUS ,FLOCALCURRID,FMATERIALID,FMaterialName,FQTY,FUnitName,FTAXPRICE,FALLAMOUNT, ROW_NUMBER() OVER(ORDER BY FID ) FIDENTITYID into TMP2329D4ABC55E11EAB63F000C29B from ( select t0.FID, t1.FENTRYID,t0.FPURCHASEORGID,t1UO_L.FNAME FOrgname,SUPP_L.FNAME FSuppName ,t0.FBILLNO ,t0.FDate ,t0.FDOCUMENTSTATUS ,t2.FLOCALCURRID ,t1.FMATERIALID ,t1M_L.FNAME as FMaterialName ,t1.FQTY ,t1U_L.FNAME as FUnitName ,t1f.FTAXPRICE ,t1f.FALLAMOUNT from T_PUR_POORDER t0 inner join T_PUR_POORDERFIN t2 on (t0.FID = t2.FID) left join T_BD_CURRENCY t20 on (t2.FLOCALCURRID = t20.FCURRENCYID) inner join T_PUR_POORDERENTRY t1 on (t0.FID = t1.FID) left join T_BD_MATERIAL_L t1M_L on (t1.FMATERIALID = t1m_l.FMATERIALID and t1M_L.FLOCALEID = 2052) inner join T_PUR_POORDERENTRY_F t1F on (t1.FENTRYID = t1f.FENTRYID) left join T_BD_UNIT t1U on (t1f.FPRICEUNITID = t1u.FUNITID) left join T_BD_UNIT_L t1U_L on (t1U.FUNITID = t1U_L.FUNITID and t1U_L.FLOCALEID = 2052) left join T_ORG_ORGANIZATIONS_L t1UO_L on (t0.FPURCHASEORGID = t1UO_L.FORGID and t1UO_L.FLOCALEID = 2052) left join T_BD_SUPPLIER_L SUPP_L on (t0.FSUPPLIERID = SUPP_L.FSUPPLIERID and SUPP_L.FLOCALEID = 2052) ) t1 Where 1=1 AND FPURCHASEORGID IN (1) AND FDate>='2020-07-14' and FDate<='2020-07-14'
删除临时表
into TMP2329D4ABC55E11EAB63F000C29B
再执行
9、最终效果,打开简单账表
总目录链接
53.3.zip(97.16KB)
赞 15
15人点赞
还没有人点赞,快来当第一个点赞的人吧!
打赏
0人打赏
还没有人打赏,快来当第一个打赏的人吧!