润乾打印标签横向扩展




  select (select count(id) from tms_elec_table where trans_code <= et.trans_code) as seq,

et.type as type,et.trans_code as trans_code,et.lot_no as lot_no,

temp.name as name,temp.code as tempCode,rt.code as lineCode,

to_char(et.date_1,'yyyyMMdd') as date_1

from tms_elec_table et

left join tms_receiver temp on temp.id=et.received_id

left join tms_route rt on rt.id=temp.route_id

where 1=1

order by seq,et.type,lineCode

 

A1:=ds1.count(),用于计算此数据集内的数据个数。

B1:=int(A1)/3+1,用于计算一共需要扩展的行数,其中”3″是每行的数据列数。

A3:=to(1,B1),作为强制分行的扩展基础。

B3:=(A3-1)*3,是每行的基数。

D2:=to(1,3),与B1统一,控制显示为5列数据,扩展方式为横向扩展

D3:=ds1.select1(type,seq==D2+B3) ,其中D2+B3分别递增,达到与每个seq进行匹配的目的,这里需要着重强调的是数据集里需要”seq”是连续递增的数字,来实现换行后的匹配。

D4:=ds1.select1(name,seq==D2+B3),把D4的上主格设置为E3。

D5: =ds1.select1(tempCode,seq==D2+B3),把D5的上主格设置为E3。

D6: =ds1.select1(seq,seq==D2+B3),D6扩展方式为横向扩展。

E3: =ds1.select1(trans_code,seq==D2+B3).

F5: ='批次'+ds1.select1(lot_no,seq==D2+B3),把F5的上主格设置为E3。

H3: =ds1.select1(seq,seq==D2+B3).

H4: =ds1.select1(lineCode,seq==D2+B3),把H4的上主格设置为E3。

H5: =ds1.select1(date_1,seq==D2+B3),把H5的上主格设置为E3。

粗略效果如下:



 

 

 

http://blog.sina.com.cn/s/blog_59def1cb0100gbka.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值