Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

null and not null values in a cross tab

Status
Not open for further replies.

jschill2628

Programmer
Nov 3, 2009
156
US
I am using Crystal XI.

I have the following formula, that I want to put in a Crosstab, however it is not populating everything, when I put the formula into the Crosstab, it only shows the first two values Cause- Not Populated and Cause- Populated.

(if isnull ({CHICLAIMSA1.SA136}) then "Cause- Not Populated" else
if not (isnull ({CHICLAIMSA1.SA136})) then "Cause- Populated" ) or

(if isnull ({CHICLAIM.SPECIAL9}) then "Severity- Not Populated" else
if not (isnull ({CHICLAIM.SPECIAL9})) then "Severity- Populated" ) or

(if isnull ({CHICLAIMSA1.SA73})then "Injury- Not Populated" else
if not (isnull ({CHICLAIMSA1.SA73})) then "Injury- Populated" ) or

(if isnull ({CHICLAIMSA1.SA138}) then "Line of Business- Not Populated" else
if not (isnull ({CHICLAIMSA1.SA138})) then "Line of Business- Populated" ) or

(if isnull ({CHICLAIMSA1.SA139}) then "Event Type- Not Populated" else
if not (isnull ({CHICLAIMSA1.SA139})) then "Event Type- Populated" ) or

(if isnull ({CHICLAIMSA1.SA140}) then "Event Subtype- Not Populated" else
if not (isnull ({CHICLAIMSA1.SA140})) then "Event Subtype- Populated" )


THANK YOU!!
 
How were you planning on using this formula in a crosstab? An if/then statement will stop processing as soon as a record meets a criterion in the formula, so the later clauses are not being processed. Since these are different fields, they probably should be handled in separate formulas. Because they are in different fields they are not really suited for a crosstab.

-LB
 
What are you trying to do? If you want to count the various instances, then set up a number of formula fields, e.g.
Code:
if isnull ({CHICLAIMSA1.SA136}) then 1
else 0
The reason your formula fails is that the first two tests exhaust the possibilities: either that field is null or it isn't.

You could then do a summary count of @CauseUnpopulated, or do a crosstab using it. Repeat for the other fields.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top