如果为null或为空,则更改报告文本框backcolor [英] Change report textbox backcolor if null or empty

查看:65
本文介绍了如果为null或为空,则更改报告文本框backcolor的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我认为这应该有效(并且它在一个表中的两个日期字段中,但没有其他字段):

I thought this should work (and it does on two date fields in one table, but no other fields):

展开 | 选择 | 换行 | 行号

推荐答案

尝试将测试更改为

Try changing your test to

展开 | 选择 | Wrap | 行号


吉姆。上面的代码没有工作;我已经逐行跟踪它,检查在即时窗口中的值,并且就程序而言,背景颜色正在改变。它只是没有显示在报告预览中。我想知道细节部分是否有一些设置覆盖了代码设置?此外,我做了一个实验,其中每个文本框的背景颜色在运行时都设置为淡蓝色,只有那些文本在其中受到影响 - 空或空文本框在预览时不会改变,与我想要的完全相反发生。
Hi, Jim. No the code above does work; I''ve traced it through line by line, checking values as it went along in the immediate window, and the backcolor is being changed as far as the program is concerned. It just doesn''t display on the report preview. I''m wondering if there''s some setting on the detail section that''s overriding the code setting? Also, I did an experiment where EVERY textbox has its backcolor set to light blue at runtime and only those with text in them are affected -- empty or null textboxes don''t change on the preview, the exact opposite of what I want to happen.


我发现如果我这样设置代码:

I''ve found if I set the code thusly:

展开 | 选择 | 换行 | 行号


这篇关于如果为null或为空,则更改报告文本框backcolor的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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