Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Group Switch Post Reply Post New Topic
Author Message
Twohats
Newbie
Newbie
Avatar

Joined: 07 Sep 2012
Location: Ireland
Online Status: Offline
Posts: 2
Quote Twohats Replybullet Topic: Group Switch
    Posted: 07 Sep 2012 at 4:09am
Hey guys,
First time asking a question, I'm sorry if it has already been asked before but I've been trying to find the answer to this for about a week now :P

I have two groups. Group1 and Group2.
Based on the User input the hierarchy of this is going to change, or at least thats what I want it to do.

Basically meaning Group2 is now ontop of Group1.
Is there anyway to do this in Crystal??

Thanks for the help :D
2Hats
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 07 Sep 2012 at 4:21am
Yes, it actually is not difficult.
 
By "user input" I assume you mean that you want to use a prompt for this.  You would need to create two formulas that work something like this:
 
{@FirstGroup}
if {?GroupPrompt} = 'Group1' then
  {MyTable.Group1Field}
else
  {MyTable.Group2Field}
 
{@SecondGroup}
if {?GroupPrompt} = 'Group1' then
  {MyTable.Group2Field}
else
  {MyTable.Group1Field}
 
You then set up your groups based on these formulas instead of on the fields themselves.
 
-Dell
IP IP Logged
Twohats
Newbie
Newbie
Avatar

Joined: 07 Sep 2012
Location: Ireland
Online Status: Offline
Posts: 2
Quote Twohats Replybullet Posted: 07 Sep 2012 at 4:29am
You are my saviour
Worked like a charm, Thank you so much!!!
2Hats
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.