Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula for renaming group header with null value in Crystal 8.5

Status
Not open for further replies.

envirodata

IS-IT--Management
Jun 11, 2008
24
US
I have tried several different formulas but nothing seems to be working. The formulas are still returning a null value for the group header. This is what I have tried:

If IsNull ({GfMem_1.GfMem_1_Program}) Then ({GfMem_1.GfMem_1_Program}) = " Other Contribution " Else ({GfMem_1.GfMem_1_Program}) = ({GfMem_1.GfMem_1_Program})

And I have tried

If IsNull (GroupName ({GfMem_1.GfMem_1_Program})) Then (GroupName ({GfMem_1.GfMem_1_Program})) = " Other Contribution " Else (GroupName ({GfMem_1.GfMem_1_Program})) = (GroupName ({GfMem_1.GfMem_1_Program}))

And I have tried

If IsNull ({GfMem_1.GfMem_1_Program}) Then (GroupName ({GfMem_1.GfMem_1_Program})) = " Other Contribution " Else (GroupName ({GfMem_1.GfMem_1_Program})) = ({GfMem_1.GfMem_1_Program})

I have also tried

If {GfMem_1.GfMem_1_Program} = "General" Or {GfMem_1.GfMem_1_Program} = "Landmark Society" then (GroupName ({GfMem_1.GfMem_1_Program})) = {GfMem_1.GfMem_1_Program} else (GroupName ({GfMem_1.GfMem_1_Program})) = "Other Contribution"

Thank you for your help!
 
Use:

If IsNull ({GfMem_1.GfMem_1_Program}) Then
" Other Contribution " Else
{GfMem_1.GfMem_1_Program}

Note that you could group on this instead of just changing the groupname.

-LB
 
Thank you, LB. I am very new to this so I may be making a very simple mistake but the message I receive when using the formula you provided is: The result of selection formula must be a boolean.

Also, I'm not exactly sure what what your note above means about grouping on this instead of changing the groupname. Would you clarify, please?
 
You are creating the formula in the wrong area. Go to the field explorer->formula->new and create it there. Then you can go to insert->group and choose the formula to group on--instead of replacing the current groupname.

Or, since you already have the group, you can just delete the current groupname and put the formula in its place.

-LB
 
Dear Lbass,

Hope you are well.

I just wanted to point out that I think it is preferable to customize the groupname as you pointed out earlier in this thread rather than grouping on a formula.

Reason:
If the field that is grouped upon is a database field and is a summary report (details are hidden or suppressed) and in the File/Options or Report/Options you have Perform Grouping on Server checked, then the SQL query will contain a Group By on the Field in addition to the Order by. This means that the data is grouped on the server and the grouped data is returned to Crystal. This increases report performance.

Best,
ro

Rosemary Lieberman
rosemary-at-microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.

You will get answers more quickly if you read this before posting: faq149-3762
 
Excellent point. Rosemary is correct--I hadn't thought of that. Nice to see you back posting here, Rosemary!

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top