从Query中读取数据并在报告中显示它 [英] Reading Data from Query and disply it in report

查看:52
本文介绍了从Query中读取数据并在报告中显示它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在研究这个项目需要通过添加7种类型的组件中的一种来生产产品(每种类型的组件都有很多变化)。

产品由大约25个组件组成。这个项目的目的是记录每个产品的每个项目。

我创建了7个表来保存每种类型组件的记录(每个组件有23个字段)并且有一个主表,它将为每个组件保存大约25个组件的唯一ID。 inshort每个产品都有7 x 25 x 23 = 4025+的详细信息。

现在我必须生成一份报告,该报告应该提供由用户选择的唯一ID制作的产品的详细信息。报告应该是针对单个产品而不是所有产品制作的。

我在Win XP上使用Access 2003 Pro SP2版


现在来自报告我想运行一个查询,该查询将从所选的产品编号中获取输入。查询结果应分配给报告中的文本/标签。我无法弄清楚如何将查询中的记录数据读入报告。

你能帮忙吗?

谢谢!

Hi All,
I am working on this project which requries making a product by adding one of 7 types of components (each type of component in turn has many variations).
product is made of about 25 components. the purpose of this project is to make a record of each item that has gone into making of each product.
I have created 7 tables for maintaining record of each type of component (which has 23 fields each) and there is a master table which will hold unique ID of each component for about 25 components. inshort each product has 7 x 25 x 23 = 4025+ details.
Now i have to generate a report which should give details of product made from its unique ID selected by user. the report should be for a single product made and not all the products made.
I am using access 2003 Pro with SP2 on Win XP

Now from report i want to run a query which will take input from the product number selected. result of the query should be assigned to text / lable placed in report. i am not able to figure out how to go about reading record data from a query into report.
can you guys help?
thanks !

推荐答案

我假设一切都是通过某种产品ID链接的,你应该能够创建一个选择这些的查询产品ID。
I assumed everything is linked through some sort of product ID, you should be able to create a query that selects these product IDs.



我假设所有内容都通过某种产品ID链接,您应该能够创建一个选择这些产品的查询标识。
I assumed everything is linked through some sort of product ID, you should be able to create a query that selects these product IDs.



嗨兔子,

我写了一个查询,显示正确的数据,但无法将其结果读入报告。我的问题更加复杂,因为我需要将至少25个查询中的数据读入此报告。


i决定使用Dlookup函数来执行此任务。

有没有一种方法可以遍历表的字段而不指定字段的实际名称?如果一张桌子有字段,如


名字

姓氏

middlename

age

地址等


我可以用2或类似名称来表达姓氏吗?


感谢您的支持帮助。

问候,

独眼巨人

Hi Rabbit,
I wrote a query which displays correct data but can not read its results into the report. my problem is further compounded as i''ll need to read data from atleast 25 queries into this report.

i have decided is to use Dlookup function to carryout this task.
is there a way to loop through the fields of a table without specifying the actual name of the field? say if a table has fields such as

name
lastname
middlename
age
address etc

can i address lastname by ''2'' or something like it?

thanks for your help.
Regards,
cyclops


这不是它的工作方式独眼巨人。

您需要创建报表可以运行的查询(单个查询)。也可以使用子报告,但每个报告都需要一个绑定的单个数据源(通常是查询)。

DLookup()不是用于构建报告的好主意。这就是查询的目的。
That''s not how it works Cyclops.
You need to create a query (single query) that your report can run from. Sub-reports can also be used but each individual report needs a single datasource (usually a query) that it is bound to.
DLookup() is not a good idea for building up reports with. That''s what queries are for.


这篇关于从Query中读取数据并在报告中显示它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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