Skip to Content

Crystal Report Version:

Crystal Report 2008

Scenario:

In Crystal, when we are grouping the concatenation of 2 string or char fields in the report, some time will get the “Invalid Null Group Condition” Error during the run time. This is because of the “Null” value return by anyone of the grouping fields.

Approach:

1. Create the formula for the grouping field.

2. In the formula check the null condition for both string fields before concatenation. For example we have to group CUST_REF & CUST_NM

3.  The formula for the null checking & concatenation:

Stringvar CustRef:= IF ISNULL(CUST_REF) then “” else CUST_REF;

Stringvar CustName:= IF ISNULL(CUST_NM) then “” else CUST_NM;

Stringvar Group:= CustRef & CustName;

Group; // Returns the value for the group variable.

4. This formula will check whether the field is having null value and then it will assign it as null & then it will be concatenated & then the variable will be grouped. Before grouping we are checking for NULL condition, so we won’t get the invalid group condition error at run time.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply