Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Minimum Summary on a 2nd Pass Formula Post Reply Post New Topic
Author Message
greengo
Newbie
Newbie


Joined: 07 Apr 2009
Location: United Kingdom
Online Status: Offline
Posts: 3
Quote greengo Replybullet Topic: Minimum Summary on a 2nd Pass Formula
     Posted: 07 Apr 2009 at 4:17am
I am trying to perform a minimum summary on a 2nd pass formula and not entirely sure how to go about this.

Ive previously performed Grand Totals on 2nd pass formulas by using variables and running totals, so assume it will be a similar process.

My formula looks like:

if previous ({po_srvc_prdct.prdct_cd}) = {po_srvc_prdct.prdct_cd}
and previous({po_order_line.order_line_amnt}) = 0
and {po_order_line.order_line_amnt} > 0
then {po_order.dspch_dt}

I am trying to return the minimum date of when prices changed from £0 to > £0

Any help or alternatives would be appreciated!!

I am using Crystal Reports 8.5, Crystal Syntax

Edited by greengo - 07 Apr 2009 at 4:20am
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 08 Apr 2009 at 7:50am
if the records are grouped by product code and date, then couldn't you in your formula just check when the price > 0?  When it is record the date of the change.  I might be different groupings, but as long as code and date are there it would seem that this would work.  You could display the date in a group footer and reset it in the header.
 
I'm not too much for looking for items in different passes that Crystal makes, but then I prefer to use stored procs and let SQL give me answers like this, so that Crystal doesn't need to.
 
Hope this helped...but I might be on the wrong track altogether.
IP IP Logged
greengo
Newbie
Newbie


Joined: 07 Apr 2009
Location: United Kingdom
Online Status: Offline
Posts: 3
Quote greengo Replybullet Posted: 08 Apr 2009 at 8:12am
I've grouped by customer, Sorted by product code ACS then date ACS

customer are given units (Multiple Specific Products, some product may be charged) to use free of charge once these units have run out they get charged base rates.

At current my formula above works on the detail line, but i am trying to avoid using the detail section and summarise on a group level. Some customers may have 1000's of orders, so this info is not needed.

If its possible could you point me in the right direction for use of stored procs, it may be of some use. Even if my SQL is limited
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