Solved

Crystal Reports - Grouping Error

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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 …
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

705 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now