开发者

Crystal Report --Missing number

I have a list of numbers and I want to somehow know if there is a number mi开发者_如何学运维ssing.


Not a lot of information to go on, but going by two definitions of "missing", consider using Crystal's conditional formatting:

a. If "missing" means empty or null, check for that, and flag the outputted field with color and/or replacement text.

b. If "missing" means a number in a series isn't there, you'll have to create a running total or similar to fit the series, then compare that to what your data is returning. When they don't match up, that's when you flag the missing number.


Assuming this is a consecutive list of numbers (ie 1,2,3,4, etc) and you're looking for gaps, add a formula like this (Crystal Syntax) :

If Not (PreviousIsNull({Table.NumberField})) Then
    (Previous({Table.NumberField}) <> {Table.NumberField} - 1)
Else
    False

This will return True if the current row is not one more than the previous row.

Otherwise, one of David's solutions is more suitable.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜