如何以第1,第2,第3等格式对报表进行运行计数 [英] How to put a running count on a report in the format of 1st, 2nd, 3rd etc
本文介绍了如何以第1,第2,第3等格式对报表进行运行计数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试记录与主记录相关的记录。我知道您可以设置一个未绑定的文本框,其控制源为= 1,并运行Over Group的总和,但这只会给出整数。我正在调整它以显示第1,第2,第3,第4等等。
有没有办法做到这一点?我想过使用VBA来做这件事,但是当报告在打印预览中打开时,它在装载后不会让你做任何事情。
提前谢谢。
Adam。
I''m trying to put a running count of the records related to the main record. I know you can set an unbound textbox with the Control Source of =1, and running sum of Over Group, however this only gives integers. What I''m after is adjusting it to display 1st, 2nd, 3rd, 4th etc instead.
Is there a way to do this? I thought about using VBA to do it but as the report opens in print preview it doesn''t let you do anything after its loaded.
Thanks in advance.
Adam.
推荐答案
啊哈,最后我自己设法解决了这个问题。对于任何有兴趣的人,我使用了未绑定的文本框(CountField)来计算Over Group的记录。然后我使用了第二个未绑定的文本框,它使用一组嵌套的iif语句作为控制源:
Aha, managed to solve this one by myself in the end. For anyone who''s interested, I used an unbound textbox (CountField) to count the records Over Group. I then used a second unbound textbox that used a set of nested iif statements as the Control Source:
< span class =codeLinkonclick =Blur(this,this.parentNode.parentNode,getChildren(this),true);>展开 | 选择 | Wrap | 行号
这是找到一个数字亚当的序数版本的相当可靠的方法(注意11)。
That''s a fairly reliable way of finding the ordinal version of a number Adam (Watch out for 11 though).
啊,该死的。我甚至试图在脑海中寻找狡猾的数字!
我需要整理12和13 ......为抬头欢呼... = /
Ah, dammit. I even tried counting in my head looking for dodgy numbers!
I''ll need to sort out 12 and 13 as well...cheers for the heads up... =/
这篇关于如何以第1,第2,第3等格式对报表进行运行计数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文