Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Date Formula Needes Post Reply Post New Topic
Page  of 3 Next >>
Author Message
lahorichick
Groupie
Groupie


Joined: 13 Aug 2009
Online Status: Offline
Posts: 54
Quote lahorichick Replybullet Topic: Date Formula Needes
    Posted: 03 Sep 2009 at 9:09am
Ok...i have a more urgent report to do now..lol
 
I need to show all accounts we haven't done business with for a minimum 5 years.
 
I have the Invoice file with Invoice.Date = the day invoice was created.
 
I figure invoice.date has be older than 9/1/2004.
 
But, where /how do i put in...if there was an invoice for after 2004 anywhere in the account- don't mention that account...HELPPP
IP IP Logged
lahorichick
Groupie
Groupie


Joined: 13 Aug 2009
Online Status: Offline
Posts: 54
Quote lahorichick Replybullet Posted: 03 Sep 2009 at 9:30am
the main jist of the formula
 
if account.number  contains {invoice.date} > Date (9/5/2005) then do not show that account. number
 
else show the account.number
 
thats the basic dumb version i think of before getting techi
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 03 Sep 2009 at 9:35am
You can use the same premise as I gave you before but decide if you want hat process based on potential group changes after the data selection process.
group on acct#
Formula field if inoice date > 9-5-05 then 1 else 0
sum on that at acct# group
group selection criteria NOT(SUM(formulafield,account#)>0)
IP IP Logged
lahorichick
Groupie
Groupie


Joined: 13 Aug 2009
Online Status: Offline
Posts: 54
Quote lahorichick Replybullet Posted: 03 Sep 2009 at 9:41am
where am i placing the Not(....) in a new formula and create a group on that? i can't...
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 03 Sep 2009 at 9:43am
Sorry,
IN your select expert but make sure to change it to "group selection"
then use  NOT(summary>0)
IP IP Logged
lahorichick
Groupie
Groupie


Joined: 13 Aug 2009
Online Status: Offline
Posts: 54
Quote lahorichick Replybullet Posted: 03 Sep 2009 at 9:50am
its grouping items as 0 that have newer invoices?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 03 Sep 2009 at 9:55am
Nope. The opposite. I think the NOT in the select statment is messing you up...
You are gouping on Acct#.
then you are flaging any row in the group where the date is > 9-5-05 with a 1.
Then you sum that "flag" at the group level. Any group > 0 means it should be exluded so that becoems your select criteria (but it is at the group level not the row level). Slect criteria have to return TRue (include) or FALSE (exclude).
To make it easier you can just use:
 
summary=0
 
instead of the NOT i gave you earlier. I did that because in some cases summaries are not done at all (NULL)  and the NOT accounted for that but I don't think you need to worry about that here.


Edited by DBlank - 03 Sep 2009 at 10:01am
IP IP Logged
lahorichick
Groupie
Groupie


Joined: 13 Aug 2009
Online Status: Offline
Posts: 54
Quote lahorichick Replybullet Posted: 03 Sep 2009 at 10:11am

its going to continue to show me the '1' accounts in the left-hand drill down menu- but won't let me access them  correct.

 

i have this running through invoices--which is taking forever...cuz it has to go through all the invoices...what would be faster? the billing number?

IP IP Logged
lahorichick
Groupie
Groupie


Joined: 13 Aug 2009
Online Status: Offline
Posts: 54
Quote lahorichick Replybullet Posted: 03 Sep 2009 at 10:26am
ah..ya...the time frame is supposed to be accounts lost within the last 5 years...lol???
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 03 Sep 2009 at 10:35am
Yep it will still show the account numbers in the group tree but not in the report.
Unless you have some other criteria like active in the last ten years and lost in the last 5 you cannot speed it up much. If you have access to creating views or stored procs in the DB you could do it faster that way (same as with your other report) but in crystal I don't know if there is a better/faster way.


Edited by DBlank - 03 Sep 2009 at 10:36am
IP IP Logged
Page  of 3 Next >>
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.