如何计算表中的记录,并在报表上显示结果? [英] How to count records in a table, and display results on a report?
问题描述
Hello Everyone,
我想计算不同记录的出现次数,例如:
MOT484354
PRN487522
COM45757
COM45775
PRN124872
PRN127754
MOT445778
COM444588
结果应该是这样的:
MOT - 2
PRN - 3
COM - 3
*前3个字符让我知道记录是什么。
非常感谢任何想法。
Hello Everyone,
I am wanting to count the occurence of different records, for example:
MOT484354
PRN487522
COM45757
COM45775
PRN124872
PRN127754
MOT445778
COM444588
The results should be something like:
MOT - 2
PRN - 3
COM - 3
*The first 3 charachters let me know what the record is.
Any thoughts would be greatly appreciated.
推荐答案
按左分组([Field],3)
并使用字段计数。
Group by Left([Field], 3)
And use a count of the field.
按左分组([Field],3)
并使用字段计数。
Group by Left([Field], 3)
And use a count of the field.
感谢您的帮助。是否只有一个页面报告可以提供表格中数据的快照?我只想说能够说出这个和那个数字的x个数字,就像那样。
Thanks for the help. Is there away to get only one page report that gives a snapshot of the data in the table? I just want to be able to say that there were x number of this and y number of that, stuff like that.
这就是分组和计数应该做的事情,分组和在查询中计算并将报告基于此。
That''s what the grouping and counting should do, Group and count in a query and base the report off that.
这篇关于如何计算表中的记录,并在报表上显示结果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!