开发者

Crystal Reports show field grey when date is null

Our user wants a date field to display as highlighted or with a grey background when the date is null. How would I do something like this? (At the very least, I suspect I'll first have to convert it to a string.)

Com开发者_开发百科pleted Date 
12/15/2010 
03/07/2011
          <-- make that a grey block
05/01/2010


I hope that you don't think this too hacky but you can do what you want by adding a Formula field and calling it something like NullCheck. Then put the code below in the NullCheck formula field so that it places an X whenever the date field is null.

If IsNull({DeleteMe.DateField}) Then
"X"

Next put that field (NullCheck) on your page so that the box covers the date field exactly. Then use the Highlighting Expert to set the background and the font to the same color when the X appears in the field (see image below).

Crystal Reports show field grey when date is null

When done it should "highlight" all null dates fields as shown.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜