如何在一个报告上获得多个查询结果? [英] How do you get multiple Query results on one report?

查看:88
本文介绍了如何在一个报告上获得多个查询结果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我总是很难清楚地解释这些问题但是这里... ...


我有一份报告,通常的布局不适合我的需要(例如。重复每条记录的细节)


我已经通过使用文本框自己设计报告并手动将查询数据分配给它来解决了这个问题。我可以轻松地将当前记录字段分配给报告,我只是将控制源设置为查询记录。 有一个b
我难倒的是如何将下一个查询记录分配给第二组文本框等等。


是否有一些命令= [查询]![field]![recordno]?


谢谢

解决方案

< blockquote>

一般方法:您可以使用域函数,尤其是DLookup()。但它们很慢。您可以使用DAO.Recordset的静态变量实现自己的公共函数,并在该函数中执行这些查找。


我更喜欢的方法:我使用(本地)报表,当我需要结合多个或复杂查询的结果时。此表仅用于存储该单个报告的数据,因此可能会略微非规范化。只需在显示之前计算报告
数据到此表中。顺便说一句,取决于报告的结构,例如子报告可能有更多的报告表。



I always struggle to explain these questions clearly but here goes...

I have a report, the usual layout Will not be suitable for what I need (eg. repeating the detail for each record)

I have fixed this problem by designing the report myself using textboxes and manually assigning the query data to them. I can easily assign the current records fields to the report, I just set the control source to the query record.  The one that has me stumped is how to assign the next query record to the second set of text boxes and so on.

is there some command along the lines of =[query]![field]![recordno]?

thanks

解决方案

The general approach: You may use the domain functions, especially DLookup(). But they are slow. You may implement your own public function using a static variable for a DAO.Recordset and do these lookups in that function.

The approach I'd prefer: I use a (local) report table, when I need to combine the results of multiple or complexe queries. This table is only designed to store the data for that single report, thus it may be slightly denormalized. Just calculate the reports data into this table before displaying it. btw, depending on the report's structure e.g. with sub-reports there may be more report tables.


这篇关于如何在一个报告上获得多个查询结果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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