Access 2007 报告分组
我正在使用 Access 2007 数据库来跟踪和报告设备的停机时间和可靠性。我的设备表中有四种不同的设备。我还在它自己的表中跟踪所有停机事件。我们还需要知道设备何时实际使用,以便我们可以判断停机是否影响了我们的操作。我们在不同的表中跟踪使用情况。
我的报告查找所有发生的停机时间,通过设备对它们进行分组,然后使用组页脚对停机时间进行小计,查找该期间的使用情况并计算正常运行时间百分比。
我的问题是,如果没有停机时间,访问报告会跳过整个设备(显然是因为它仅通过查询停机时间表来了解这一点)。我希望始终看到所有设备的分组,如果没有停机,它仍然应该显示页脚以及总使用情况和可靠性统计数据。
我意识到访问可能不是最好的工具,但在我的工作环境中,这也是我可以轻松访问的全部。我还意识到,如果不过于具体,可能很难给出具体的答案,但希望有人能引导我走向正确的方向。
感谢您的任何见解。
I'm using an access 2007 database to track and report down time and reliability of devices. I've got four different devices in the Devices table. I also track all downtime occurrences in it's own table. We also need to know when the devices are actually in use, so we can tell if the downtime affected our operation at all. We keep track of use in a different table.
My report looks up all the downtime occurrences, groups them via device and then uses the group footer to sub total the downtime, look up use for the period and calculate the up time percentage.
My problem is that if there is no downtime, the access report skips that entire device (obviously because it doesn't know about it from just querying the downtime table). I would like to always see the grouping for all devices and if there is no downtime it should still show the footer with total use and reliability statistics.
I realize access isn't maybe the best tool, but in my work environment that's all I have easy access too. I also realize without getting overly specific it might be hard to give concrete answers but hopefully someone can steer me in the right direction.
Thanks for any insight.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您没有提供详细信息,因此这里的答案有些模糊。执行此操作的最佳方法通常是设置报告查询,以便它始终包含完整的设备列表。这可以通过从主设备表到数据表的 LEFT JOIN 来实现。如果空值是一个问题,您可以使用 Nz 返回合适的值。
You do not provide details, so here is a somewhat vague answer. The best way to do this is usually to set up your query for the report so that it always contains a full list of devices. This can be achieved by a LEFT JOIN from the main device table to the data table. You can use Nz to return a suitable value if nulls are a problem.