Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Restart Group Number per group Post Reply Post New Topic
Author Message
cvgalloway
Newbie
Newbie


Joined: 07 Jul 2008
Location: United States
Online Status: Offline
Posts: 4
Quote cvgalloway Replybullet Topic: Restart Group Number per group
     Posted: 07 Jul 2008 at 1:26pm
I am on Crystal 11
I have a report that has two groups - 1st group is by salesrep and 2nd group is by customer.
I want to show a group number for each customer (basically rank the customers) for each salesrep - so I need it to restart at 1 for my group 1.
 
How do I do this?  If I use "group number" it just continues to number.
 
Thanks for your help!
Catherine 
IP IP Logged
venkatesha
Newbie
Newbie


Joined: 29 Jun 2008
Online Status: Offline
Posts: 35
Quote venkatesha Replybullet Posted: 07 Jul 2008 at 10:59pm
I don't think its possible to reset GroupNumber instead there are two ways you can create the rank.

1. Using Formula
2. Using Running Total

Using Formula
    Create two formulas Group1 and Group2
    In Group 1 formula field
       place the following formula
            WhilePrintingRecords;
            Global numberVar group;
            group:=0;
       and place the same in the Section Group1. Also suppress the same

    In Group2 formula
       place the following formula

        WhilePrintingRecords;
        global numbervar group;
        group:=(group+1);
        group;
       Place the same in Group 2 section. Now you will get the result you want.


Using Running Total (Second Approach)
    Create one new Running total.

    Summary
        Field to Summarize    select the second group
        Type of Summary       select Distinct Count

    Evaluate
                                        For Each Record

    Reset
                                        Select First Group Field.
        
          

IP IP Logged
cvgalloway
Newbie
Newbie


Joined: 07 Jul 2008
Location: United States
Online Status: Offline
Posts: 4
Quote cvgalloway Replybullet Posted: 08 Jul 2008 at 5:41am
Great Thanks - that worked perfectly!
IP IP Logged
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