Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Crystal Reports - Grouping Error

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

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

Suggested Solutions

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…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
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…

840 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