1

So I made a Crystal Report with some custom Group headers(ie. Created a formula field based off database data then used it in a group header). The Formula specifically that seems to be giving me trouble is:

IF {Quote.Field1} = true THEN "Incremental Sales Assist"
ELSE IF {Quote.Field2} = "Yes" THEN "Fulfillment"
ELSE "Sales Assist"

When the report generates it appears to ignore the else.

grouptree

If you expand the tree where the arrow is with no text next to it, it does provide the correct data that should be grouped with "Sales Assists" I just don't understand why the text is not showing there...Has anyone else encountered anything like this? Is it a crystal bug or can I just not do this? Any assistance is greatly appreciated.

justsomeguy
  • 115
  • 1
  • 11
  • You should definitely be able to do it, I've done it many times. It should also show last in the list since CR sorts alphabetically. Have you tried ELSE IF ({Quote.Field1 <> True AND Quote.Field2 = "No") then "Sales Assist"? – campagnolo_1 Oct 21 '13 at 21:22
  • That's what I thought but Yes I tried that also. Tried it again just now to make sure...still no "Sales Assist". Something else must be going on. Ill keep trying. Thanks – justsomeguy Oct 21 '13 at 21:30
  • Have you tried viewing it in a viewer instead of CR 2011? – campagnolo_1 Oct 21 '13 at 22:01
  • I am using a viewer. Tried in CR also, "Sales Assist" showed but there was still a blank branch. I changed the field to a SQL Expression Field and it's fixed. Thanks for your input. – justsomeguy Oct 22 '13 at 14:41
  • You're welcome. Glad you were able to resolve it. – campagnolo_1 Oct 22 '13 at 14:44
  • 1
    You know what, I just had a thought. In the File menu, see if under Report Options the "Convert Null Values to Default" is checked. Let me know if that does anything. – campagnolo_1 Oct 23 '13 at 23:51
  • "Convert Null Values to Default" is not checked, Checking it didn't seem to change the issue either. (+1 for the continued effort) – justsomeguy Oct 24 '13 at 19:52
  • There are two checkboxes that will convert NULL values to Default. Sometimes when you get a blank record it is because it doesn't have a value in the database. So I thought maybe that could be the reason you get a blank label but the correct data. Worth a shot and thanks for the upvote! :) – campagnolo_1 Oct 24 '13 at 20:00

1 Answers1

0

I had the same issue as the above and was getting a blank value for the last output of the IF statement.

I resolved it by recreating the Formula Field as a SQL Expression Field then using that as my grouping field.

Matt
  • 14,906
  • 27
  • 99
  • 149