Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Crystal Reports - Grouping Error

Posted on 2012-03-13
2
Medium Priority
?
269 Views
Last Modified: 2012-03-13
Good morning,

I am not able to figure out what is going on and am seeking help with this.  I have created a field called "Grouping" and in it I have identified the groups below.  This issue lies with the last two segments of the group where I switch to using the field Key Indicator.  This is to catch any records that do not have a segment in the group already.  Every record has a key indicator. For some reason NO records fall into these segments when they should be.
I have attached a screenshot of the grouping - any ideas are greatly appreciated!

Thank you - cs

If {CnCnstncy_1.CnCnstncy_1_CodeLong} = "System Board" then "System Board"
else if {CnCnstncy_1.CnCnstncy_1_CodeLong} = "Foundation Board" then "Foundation Board"
else if {CnCnstncy_1.CnCnstncy_1_CodeLong} = "Management" then "Administration"
else if {CnCnstncy_1.CnCnstncy_1_CodeLong} = "Physician" then "Physicians"
else if {CnCnstncy_1.CnCnstncy_1_CodeLong} = "Foundations" then "Corporation/Foundation"
else if {CnBio.CnBio_Key_Indicator} = "O" then "Corporation/Foundation"
else if {CnBio.CnBio_Key_Indicator} = "I" then "Major Gifts - Individuals"
0
Comment
Question by:rporter45
2 Comments
 
LVL 101

Accepted Solution

by:
mlmcc earned 1000 total points
ID: 37714819
If they don't have a CnCnstncy_1.CnCnstncy_1_CodeLong value, it is probably NULL.  Crystal stops execution when a NULL is found and is being used in a comparison.

3 ways to solve this

1.  In some versions of Crystal, you can set the formula to USE DEFAULT FOR NULL.
    There is a drop down box that has the options.  The default value is EXCEPTION FOR NULL

2.  Change the options setting to convert NULL values to default.  That could mess up other formulas or cause other problems.

3.  Trap for the NULL value in your formula

If IsNull({CnCnstncy_1.CnCnstncy_1_CodeLong}) then
(
    if {CnBio.CnBio_Key_Indicator} = "O" then "Corporation/Foundation"
    else if {CnBio.CnBio_Key_Indicator} = "I" then "Major Gifts - Individuals"
)
else If {CnCnstncy_1.CnCnstncy_1_CodeLong} = "System Board" then "System Board"
else if {CnCnstncy_1.CnCnstncy_1_CodeLong} = "Foundation Board" then "Foundation Board"
else if {CnCnstncy_1.CnCnstncy_1_CodeLong} = "Management" then "Administration"
else if {CnCnstncy_1.CnCnstncy_1_CodeLong} = "Physician" then "Physicians"
else if {CnCnstncy_1.CnCnstncy_1_CodeLong} = "Foundations" then "Corporation/Foundation"
else if {CnBio.CnBio_Key_Indicator} = "O" then "Corporation/Foundation"
else if {CnBio.CnBio_Key_Indicator} = "I" then "Major Gifts - Individuals"

mlmcc
0
 

Author Closing Comment

by:rporter45
ID: 37715228
Crazy stuff! Worked like a charm!  Thank you very much!

Have a great day,
Colleen Slater
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Integration Management Part 2
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses
Course of the Month10 days, 1 hour left to enroll

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question