使用查询创建报告 [英] Report Creation With Query

查看:59
本文介绍了使用查询创建报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我创建一份报告作为客户收据。

报告显示所有客户付款详情然后我打印

这个。

这很好用。但是,我现在想在此页面上添加更多信息到

。但我似乎无法做到这一点。


报告使用查询从表单中提取数据。我在表单上有一个下降

名为costcode1

当你点击它时会显示3个colmns。

1 Colmn显示成本代码,第二个colmn显示描述

该代码涉及的是什么。


在我创建报告的查询中,我希望能够提取

第二列,而不是成本码。显示在表格上。由于代码对我们的客户来说毫无意义。


我该怎么做?我是否在查询中这样做?


非常感谢提前!!!

解决方案

< blockquote>是的,创建一个查询,其中包含表单用作

RecordSource的表格,以及组合用作其RowSource的表格。


在查询设计视图中,您将看到连接2个表的行。双击

此行。 Access弹出一个提供3种选择的对话框。选择

说的那个:

[你的表格'表中的所有记录,以及来自[你的组合'的所有匹配的

table。]


这样,所有记录都包含在报告中,即使组合被留下了

空白。如果您想了解更多相关信息,请参阅:

查询丢失了我的记录

at:
http://allenbrowne.com/casu-02.html


-

Allen Browne - 微软MVP。西澳大利亚州珀斯。

访问用户提示 - http:// allenbrowne.com/tips.html

回复群组,而不是mvps dot org的allenbrowne。


< si **** ********@gmail.com>在消息中写道

news:11 ******************** @ g47g2000cwa.googlegrou ps.com ...


我创建了一份报告,作为客户收据。
报告显示所有客户付款细节,然后我打印
这个。
这很好用。但是,我现在想要向这个页面添加更多信息。但我似乎无法做到这一点。

报告使用一个查询从表单中提取数据。我在我的表单上有一个叫做costcode1的下降
这表明点击它时会有3个colmn。
1 Colmn显示成本代码,第二个colmn显示该代码与该代码相关的描述。

在我的查询中创建报告我希望能够提取第二个colmn而不是表格上显示的costcode。因为代码对我们的客户来说毫无意义。

我该怎么做?我是否在查询中这样做?

非常感谢提前!!!



没有行。


我的表单使用CustomerPaymentsDetails表作为记录源


组合框使用表costCodePlanning作为记录源。


costCodePlanning有3个colmns - 部门,CodeDescription,Code。


当做出选择时,它存储在名为costcode1的

colmn下的CustomerPaymentsDetails中。


我如何得到这些线条?


干杯


所以CustomerPaymentDetails.costcode1匹配costCodePlanning.Code?


在查询设计中,单击CustomerPaymentDetails中的costcode1,然后将
拖到costCodePlanning中的Code上。 Access将为您提供加入。


我想在2

表之间创建这种关系是个好主意。你可以在Relationships窗口中找到它(工具上的关系

菜单。)然后Access会自动为你提供查询中的连接。


-

Allen Browne - 微软MVP。西澳大利亚州珀斯。

访问用户提示 - http:// allenbrowne.com/tips.html

回复群组,而不是mvps dot org的allenbrowne。


< si **** ********@gmail.com>在消息中写道

news:11 ********************* @ z14g2000cwz.googlegro ups.com ...

没有行。

我的表单使用CustomerPaymentsDetails表作为记录源

组合框使用表costCodePlanning作为记录源。

costCodePlanning有3个colmns - department,CodeDescription,Code。

当做出选择时,它存储在名为costcode1的
colmn下的CustomerPaymentsDetails中。

我如何获得你说的这些线?

干杯



Hi all,

I create a report to act as a receipt to customers.
The report displays all the customer payment details and then i print
this.
This works fine. However, i now want to add some more information to
this page. But i cant seem to do it.

The report uses a query to pull in the data from the form.I have a drop
down on my form called costcode1
This shows 3 colmns when you click on it.
1 Colmn shows the cost code, the second colmn shows a description of
what that code relates to.

In my query to create the report i want to be able to pull in that
second colmn and not the costcode which is displayed on the form. As
the code would be meaningless to our customers.

How can i do this? Do i do it in the query?

Many thanks in advance!!!

解决方案

Yes, create a query that contains both the table your form uses as its
RecordSource, and also the table that the combo uses as its RowSource.

In query design view, you will see a line joining the 2 tables. Double-click
this line. Access pops up a dialog offering 3 choices. Choose the one that
says:
All records from [Your form''s table], and any matches from [Your combo''s
table.]

This way, all records are included in the report, even if the combo was left
blank. If you want more info on that, see:
The Query Lost My Records
at:
http://allenbrowne.com/casu-02.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<si************@gmail.com> wrote in message
news:11********************@g47g2000cwa.googlegrou ps.com...


I create a report to act as a receipt to customers.
The report displays all the customer payment details and then i print
this.
This works fine. However, i now want to add some more information to
this page. But i cant seem to do it.

The report uses a query to pull in the data from the form.I have a drop
down on my form called costcode1
This shows 3 colmns when you click on it.
1 Colmn shows the cost code, the second colmn shows a description of
what that code relates to.

In my query to create the report i want to be able to pull in that
second colmn and not the costcode which is displayed on the form. As
the code would be meaningless to our customers.

How can i do this? Do i do it in the query?

Many thanks in advance!!!



There are no lines.

My form uses CustomerPaymentsDetails table as record source

And combo box uses table costCodePlanning as record source.

costCodePlanning has 3 colmns - department, CodeDescription, Code.

When a selection is made it is stored in CustomerPaymentsDetails under
colmn called costcode1.

How do i get these lines you speak of?

Cheers


So CustomerPaymentDetails.costcode1 matches costCodePlanning.Code?

In query design, click on costcode1 in the CustomerPaymentDetails, and drag
it onto Code in costCodePlanning. Access will give you the join.

I imagine it would be a good idea to create this relationship between the 2
tables. You can do that in the Relationships window (Relationships on Tools
menu.) Then Access will automatically give you the joins in your queries.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<si************@gmail.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...

There are no lines.

My form uses CustomerPaymentsDetails table as record source

And combo box uses table costCodePlanning as record source.

costCodePlanning has 3 colmns - department, CodeDescription, Code.

When a selection is made it is stored in CustomerPaymentsDetails under
colmn called costcode1.

How do i get these lines you speak of?

Cheers



这篇关于使用查询创建报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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