Crystal Report group header UCase

I How to make group header UCase. Group is based on formula.
TarasAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mlmccCommented:
You can change the formula to return the uppercase

UCase or Uppercase

You can set the group to show a value based on a formula (2nd tab)

UCase({Groupformula})

mlmcc
0
TarasAuthor Commented:
I have this formula to adjust g names but this is not working.

@AdjustGName;


Global StringVar GName;

If {table1.RoleName} = "Chair" Then

GName:="Club Current Chair"

ELSE

If {table1.RoleName} = "Warden" Then

GName:= "Club Warden"

ELSE

If {table1.RoleName} = "Secretary" Then

GName:= "Club First Secretary"

Else

GName:= {Table1.RoleName}; // this means that other role names stay //unchanged.

GName:= UpperCase(GName);
GName;
0
mlmccCommented:
What isn't working?

You might try using it as

@AdjustGName;


Global StringVar GName;

If UCase{table1.RoleName}) = "CHAIR" Then

      GName:="Club Current Chair"

ELSE

If UCase({table1.RoleName}) = "WARDEN" Then

     GName:= "Club Warden"

ELSE

If UCase({table1.RoleName}) = "SECRETARY" Then

    GName:= "Club First Secretary"

Else

GName:= {Table1.RoleName}; // this means that other role names stay //unchanged.

GName:= UpperCase(GName);
GName; 

Open in new window


mlmcc
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

TarasAuthor Commented:
No it is not working. Still it is showing the group name as it is in field  table1.RoleName.
0
James0628Commented:
Are you saying that you're not seeing uppercase strings?  If you put that formula on the report, I don't see how it could not give you an uppercase string.

 If you're seeing uppercase strings, but you're not getting your replacement strings, like "CLUB WARDEN", then I'd have to assume that there is something wrong with your tests.

 Maybe the case is wrong (eg. the field is "warden", not "Warden"), but mlmcc's suggestion should handle that.

 Or maybe the field contains more than just the words that you're looking for.
  "Warden 2" <> " Warden" <> "Warden"

 If, for example, you're looking for any string that contains the word "Warden", you can use Like:
{table1.RoleName} like "*Warden*"

 James
0
mlmccCommented:
How are you using AdjustGName?

Have you put it on the report?

IS the group based on a formula that returns GName?
If so just add the code to the end of that formula.

mlmcc
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TarasAuthor Commented:
Hi mlmcc.
It is working now. I was using group expert to change group and picked up AdjustGName as the field for changed group. It did not work on that way.
It worked when I bring formula in group header. Then it shows proper UCase and changed  Club role names .
What was happening It looks like when I changed group through group expert it just put the new group name in group header, not actual formula AdjustGName.
I should know that in group header you have just title (label ) of  changed group header, that was my mistake.
Thanks for your help.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.