Parameter-defined Repeating Times for Each Row


Question
I design a report for printing item label.

I would like to duplicate each detail row with a report parameter that define how many time each Item repeating.

Example :

Value of report parameter (Qty of label by item) : 3

-label_item1

-label_item1

-label_item1

-label_item2

-label_item2

-label_item2

-label_item3

-label_item3

-label_item3

How can i achieve this ?

 

Answer

Retrieve the data, and then we can conveniently copy each detail row in SPL:

A

1

=connect(“demo”)

2

=A1.query(“SELECT   empname FROM STAFF”)

3

=A2.conj([~]*times)

 

Result of executing the SPL script: 

 

A1: Connect to the database;

A2: Retrieve the data;

A3: Copy each detail row for specified times, which is represented by parameter times whose value is an integer greater than zero.


以下是广告时间

对润乾产品感兴趣的小伙伴,一定要知道软件还能这样卖哟性价比还不过瘾? 欢迎加入好多乾计划。
这里可以低价购买软件产品,让已经亲民的价格更加便宜!
这里可以销售产品获取佣金,赚满钱包成为土豪不再是梦!
这里还可以推荐分享抢红包,每次都是好几块钱的巨款哟!
来吧,现在就加入,拿起手机扫码,开始乾包之旅



嗯,还不太了解好多乾?
猛戳这里
玩转好多乾