Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Difference using Prior Detail Row

Status
Not open for further replies.

wanzek1

Technical User
Jun 13, 2012
79
US
I need a to do a date difference that goes something like this but I don't know how to get the prior detail row information:

if {APUR.ApprovalSeq}=Minimum ({APUR.ApprovalSeq}) then

dateDiff("d", {APUR.DateAssigned},{APUR.DateApproved})

else if {APUR.ApprovalSeq}<>Minimum ({APUR.ApprovalSeq})

then dateDiff("d", {APUR.DateAssigned},Prior({APUR.DateApproved})) <<this is where I get stuck. Is there a way to use the prior DateApproved from the prior detail line?
 
There is a Previous() function in CR that pulls a value from the prior detail. Just note that the prior detail could pull from a prior group.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guides to Formulas, Parameters, Subreports, Cross-tabs, VB, Tips and Tricks
 
Is there a way to do this without having the possibility of crossing groups?
 
You can use an IF statement:

If {GroupField} <> Previous ({GroupField})
then ...

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guides to Formulas, Parameters, Subreports, Cross-tabs, VB, Tips and Tricks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top