Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Group data using custom formula Post Reply Post New Topic
Author Message
bczm8703
Newbie
Newbie


Joined: 12 Jul 2011
Location: Singapore
Online Status: Offline
Posts: 4
Quote bczm8703 Replybullet Topic: Group data using custom formula
     Posted: 12 Jul 2011 at 2:55am
my assignment is to edit the current rpt file with the following criteria

final%20report%20format


as shown in the image, the data will be group base on their bill number.. the bill number will be consider in same group under the following condition;

1)  the interval between the first bill number and second number is 11 as display in s/n 4 and 5

2)  if the previous number end with 6, it will be reset to 0 as shown in s/n 7 and 8

3) the group end when the next bill number could not be found in the MS Access DB and the sub total of the group will then be calculated and display

this is my first time using crystal report..

btw i am using crystal report 8


Edited by bczm8703 - 12 Jul 2011 at 2:55am
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 13 Jul 2011 at 4:03am
as long as all the criteria for grouping is in the table and does not need to be modified, you can create a formula that satisfies your requirements.
 
ie, you can't use sum or avg
 
Looking at the sample, I am not sure that this can be done in CR.
WHY?
Basically, CR scans the data and by just looking the data determines which group it belongs to. 
 
This can't be done in the above example, if it was look at the last digit of the bill number, then it could do it, but is 11 away from the previous...well maybe, but reset to 0 if 7, no...
 
HTH
good luck
IP IP Logged
sharona
Senior Member
Senior Member
Avatar

Joined: 16 Oct 2008
Location: United States
Online Status: Offline
Posts: 255
Quote sharona Replybullet Posted: 14 Jul 2011 at 3:00am
create a few formulas to start with
 
1) do you mean date interval then use datediff function
 
2) then take the formula and create a new formula
right(formula),1) this will give you last number from 1
then you can use to =6
 
3) dont really get #3
sharona
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