需要有条件地为报表中的每个明细记录添加不同数量的行 [英] need to conditionally add varying number of lines to each detail record in report

查看:86
本文介绍了需要有条件地为报表中的每个明细记录添加不同数量的行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个订单,其中包含要打印的明细项目。每个项目可能会或可能不会在框中发货,并且框的数量会有所不同。用户需要带有下划线为8个字符的添加行的报表。每个,即________,为每个细节的每个盒子手动写入一些重量信息。可以从详细记录中的一个字段中获取框数。

因此,如果一个细节有12个盒子,则会添加一行10个下划线和2个下划线的第二行,即

So if there were 12 boxes for one detail,  then one line of 10 underscores and second line of 2 underscores are added, i.e..

________ ________ ________ ________ ________ ________ ________ ________ ________ ________

________  ________  ________  ________  ________  ________  ________  ________  ________  ________ 

如果有10个方框用于另一个细节,则有2个线,一个有8个下划线,一个有两个下划线,

If there are 10 boxes for another detail then 2 lines, one with 8 underscores and one line with two underscores,

________ ________ ________ ________ ________ ________ ________ ________

________  ________  ________  ________  ________  ________  ________  ________ 

________ ________

________  ________ 

等。

无论可能有多少个盒子,最大行数为10(100个盒子的100个下划线)。

The maximum number of lines is 10 (100 underscores for 100 boxes) regardless of how many more boxes there may be.

我可以看到这样做的唯一方法是向数据表添加每个80个字符的附加字段,然后循环到数据集并添加这些字段每个详细记录的适当数量的下划线。然后使用这个重建的数据表照常打印报告。

Off hand the only way I can see to do this is to add additional fields of 80 characters each to the datatable and then loop thru the dataset and add these fields with the appropriate number of underscores for each detail record.  Then just print the report as usual using this reconstructed datatable.

还有其他方法吗?

谢谢

smHaig

推荐答案

我从你的帖子得到的是你总是想要在最后一行有两个下划线?

创建一个文本框,将其置于详细信息部分并调整为最大宽度并启用可以增长


这篇关于需要有条件地为报表中的每个明细记录添加不同数量的行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆