开发者

Crystal report: How to show empty rows that are predefined?

The situation is the following:

In a database I have a table that stores the number of occurrencies an error occurred. Say

ErrorId  Timestamp  N
Err1     t1         2
Err2     t2         7

I query this da开发者_如何学运维ta, and must use the cross-table of crystal report to show the data. Three (3) error codes must be shown: Err1, Err2 and Err3, in this order.

I defined the cross-tab and selected "in predefined order" in the general tab for the group options (just below the definition of the rows). I inserted 3 Groups (Err1, Err2 and Err3).

In the resulting report it is no problem for Err1 and Err2. But Err3 is not shown.

Question

Is there a way to show the empty row for Err3 even though there is no data for it?


Version used: Crystal report XI.


If Err3 is not included in the data then it will not be displayed in the cross-tab.

I would recommend altering your query so Err3 is always included, even if it doesn't have any data. You could outer join your Err table (assuming that you have one) to your Occurrence table.


You can do this by doing a LEFT JOIN link from your Error table to the Occurence table, but you must make sure that the settings Convert Database NULL Values to Default and Convert Other NULL values to Default are turned off. Otherwise, the count of Err3 will erroneously show up as 1 as the query will convert the uncountable NULL to a countable 0 value.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜