"移动"基于2个条件的报告中的一行 [英] "Moving" a line in a Report based on 2 conditions

查看:64
本文介绍了"移动"基于2个条件的报告中的一行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个简单的报告,列出姓名,地址,家庭电话,手机和电子邮件地址。格式就像?地址卡? Outlook中的格式(见下文)。名册上的许多人都没有手机和/或eMailAddress。我在标签上使用了一个文本框?用于手机和电子邮件领域。我使用以下手机?标签?:= IIf(IsNull([Cell]),",手机:),这样如果没有手机号码,那么?标签?不打印。我在电子邮件字段中有类似的代码。如果手机和电子邮件字段均为空,则效果很好


如果有电子邮件地址(底线)但没有手机号码(第二行),则会出现问题。我最后得到一个空白行,将电子邮件地址与其余行分开。有没有办法可以编写电子邮件地址?标签? (文本框)说如果手机字段为空,但电子邮件不是,要将电子邮件地址移动到手机输入的位置?我想也许我可以使用?Top?属性,但我无法找到任何帮助如何测试2个条件。我也无法通过嵌套的Iif找到一种方法。


我真的很感激一些帮助。谢谢!


名称

地址

城市,州,邮编

家庭电话
手机

eMailAddress

I am developing a simple report that lists Name, Address, Home Phone, Cell Phone and eMail address. The format is like the ?Address Cards? format in Outlook (see below). Many of the people on the roster have no cell phone and/or eMailAddress. I used a text box for the ?label? for the cell phone and email fields. I used the following for the cell phone ?label?: =IIf(IsNull([Cell])," ","Cell Phone:") so that if there is no cell phone number, the ?label? doesn?t print. I have similar code in the email field. If both cell phone and email fields are null, it works great

The problem arises when there is an email address (bottom line) but no cell phone number (2nd last line). I end up with a blank line separating the email address from the rest of the lines. Is there a way that I can code the email address ?label? (text box) to say that if the cell phone field is null, but the email isn?t, to move the email address up to where the cell phone entry would have been? I thought maybe I could use the ?Top? property, but I can?t find in any of the help how to test for 2 conditions. I couldn?t figure out a way to do it via nested Iifs either.

I would really appreciate some help. Thanks!

Name
Address
City, State, Zip
Home Phone
Cell Phone
eMailAddress

推荐答案


我正在开发一个简单的报告列出姓名,地址,家庭电话,手机和电子邮件地址。格式就像?地址卡? Outlook中的格式(见下文)。名册上的许多人都没有手机和/或eMailAddress。我在标签上使用了一个文本框?用于手机和电子邮件领域。我使用以下手机?标签?:= IIf(IsNull([Cell]),",手机:),这样如果没有手机号码,那么?标签?不打印。我在电子邮件字段中有类似的代码。如果手机和电子邮件字段均为空,则效果很好


如果有电子邮件地址(底线)但没有手机号码(第二行),则会出现问题。我最后得到一个空白行,将电子邮件地址与其余行分开。有没有办法可以编写电子邮件地址?标签? (文本框)说如果手机字段为空,但电子邮件不是,要将电子邮件地址移动到手机输入的位置?我想也许我可以使用?Top?属性,但我无法找到任何帮助如何测试2个条件。我也无法通过嵌套的Iif找到一种方法。


我真的很感激一些帮助。谢谢!


名称

地址

城市,州,邮编

家庭电话
手机

eMailAddress
I am developing a simple report that lists Name, Address, Home Phone, Cell Phone and eMail address. The format is like the ?Address Cards? format in Outlook (see below). Many of the people on the roster have no cell phone and/or eMailAddress. I used a text box for the ?label? for the cell phone and email fields. I used the following for the cell phone ?label?: =IIf(IsNull([Cell])," ","Cell Phone:") so that if there is no cell phone number, the ?label? doesn?t print. I have similar code in the email field. If both cell phone and email fields are null, it works great

The problem arises when there is an email address (bottom line) but no cell phone number (2nd last line). I end up with a blank line separating the email address from the rest of the lines. Is there a way that I can code the email address ?label? (text box) to say that if the cell phone field is null, but the email isn?t, to move the email address up to where the cell phone entry would have been? I thought maybe I could use the ?Top? property, but I can?t find in any of the help how to test for 2 conditions. I couldn?t figure out a way to do it via nested Iifs either.

I would really appreciate some help. Thanks!

Name
Address
City, State, Zip
Home Phone
Cell Phone
eMailAddress



为了做你要求的事情,你必须动态地改变ControlSource的相关性当条件满足时,[手机]字段到[email]字段的字段(IsNull([手机])和非IsNull([email]))。这不能在详细信息部分的Format()或Print()事件中完成。

In order to do what you are requesting, you would have to dynamically change the ControlSource relating to the [Cell Phone] Field to that of the [email] Field when the condition is met (IsNull([Cell Phone]) And Not IsNull([email])). This cannot be done in either the Format() or Print() Events of the Detail Section.


那里。


尝试像smthng一样这个

Hi, there.

Try smthng like this

展开 | 选择 | Wrap | 行号


哇,谢谢快速回复!您提供的代码在有电子邮件地址时工作,但没有单元格编号。但是,如果同时包含单元格编号和电子邮件地址,则电子邮件地址会覆盖单元格编号。
Wow, thanks for the quick response! The code you provided worked when there was an email address, but no cell number. However, when there is both a cell number and email address, the email address overlays the cell number.


这篇关于"移动"基于2个条件的报告中的一行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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