关于报告的问题 [英] Question about Reports

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

问题描述

我正在进行Access库存计划。我已经完成了几乎所有的事情,但是现在只有一件事给我带来了麻烦,它涉及报告。我将尝试尽可能地解释它。


假设您有项目#1,项目#1具有属性#1,属性#2,属性#3和属性#4。现在,假设您有项目#2,项目#2具有属性#2和属性#4。


现在,在表格中,一个项目没有确定"属性"将收到N / A.例如,由于项目#2仅具有属性#2和4,因此在项目#2中,属性#1和#3的列值将为N / A.


现在,关于我的问题。使用该表的查询,我将创建一个报告作为一种收据。收据将显示项目及其各自的属性。但是,我想要的是,当它写一个项目时,它没有的属性不会写它。例如,如果我想写第2项,我不想要属性#1和#3,因为它们会显示N / A,我不认为它看起来很好。


我已经有了必要的代码,我的问题是我不知道它什么时候会执行。我已经尝试过报告加载,但它只占用最后一个字段的值。每次编写项目时我都需要检查代码。有人怎么怎么做?请完成我的程序,这是我唯一需要做的事情。

I''m doing an Access inventory program. I already got practically everything done, but there''s only one thing that''s giving me trouble right now, and it involves the reports. I''m going to try to explain it as general as possible.

Suppose you have item#1, and item#1 has attribute#1, attribute#2, attribute#3 and attribute#4. Now, suppose you have item#2, and item#2 has attribute#2 and attribute#4.

Now, in the table, an item that doesn''t have a certain "attribute" will receive a N/A. For example, since item#2 only has attribute#2 and 4, in item#2''s column value for attributes #1 and #3 will be N/A.

Now, on to my problem. Using a query of that table, I will be creating a report as a sort of "receipt". The receipt will show the items and their respective attributes. However, what I want is that when it writes an item, the attributes that it doesn''t have doesn''t write it. For example, if I want to write item#2, I don''t want the attributes #1 and #3, since they will display N/A, and I don''t think it looks good.

I already have the necessary code for it, my problem is that I don''t know when it will execute. I''ve tried it on report load, but it only takes the value of the last field. I need the code to check every time it writes an item. Does anyone how how to do this? Please this is the only thing I have to do to finish my program.

推荐答案

我可能已经读错了,但你不能稍微改变一下这个问题。因此,在每个属性的标准中,您可以放置​​<> " N / A" (因此查询将显示它不显示的所有字段N / A)。这是假设您的表中的每个属性字段都归属于N / A。如果项目没有该属性,则为value。


希望有意义!
I might have read this wrong but couldn''t you change the query slightly. So in the criteria for each attribute you could put <> "N/A" (so the query will display all fields where it doesn''t display "N/A"). That''s assuming that every attribute field in your table(s) are attributed with an "N/A" value if the item doesn''t have that attribute.

Hope that makes sense!


要给出正确答案,您必须提供代码以及表格结构。所有属性都存储在主表或子表中吗?
To give a proper answer, you will have to provide your code, as well as your table structure. Are all attributes stored in the main table or in subtables?


好的,我的库存程序适用于名为Yu-Gi-Oh的交易卡。这些卡分为三种类型:怪物,法术和陷阱。怪物有怪物类型,攻击和防御。法术和陷阱没有这些,所以每当它是一个咒语或陷阱时,我在这三个领域都有一个N / A值。在报告中,我想在卡片类型为咒语或陷阱时隐藏这三个字段。我希望这会让事情变得更轻松。


Hedges:我试过你说的但问题是它隐藏了整张卡片,而不仅仅是列。
Ok, my inventory program is for trading cards called Yu-Gi-Oh. These cards are divided in three types: Monster, Spell and Trap. Monsters have monster type, attack and defense. Spells and Traps don''t have these, so whenever it is a spell or trap, I have a N/A value in those three fields. In the report, I want to hide those three fields whenever the card type is spell or trap. I hope that makes things easier.

Hedges: I tried what you said but the problem is that it hides the whole card, not just the column.


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

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