Solved

Crystal Reports - Grouping Error

Posted on 2012-03-13
2
264 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 100

Accepted Solution

by:
mlmcc earned 250 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

685 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