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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Substract on the same field

Status
Not open for further replies.

jpillonel

Programmer
Dec 17, 2003
61
CH
Hello,

I work on Crystal Reports 9 with a MSSQL database.

I create a group on the report with this field: call_req.ref_num

The table call_req is correctly linked with the cr_prp table.

So for each group there two field called cr_prp.label and cr_prp.value. This field are in a detail section.

The problem is that for each group there is always two times the same value like:
cr_prp.label=DOWN TIME START
cr_prp.value=02/12/2003 10:00
cr_prp_label=DOWN TIME STOP
cr_prp.value=02/12/2003 12:00

How can I substract this date value fields ? I try to create a forumla with this basic syntax but it doesn't works:
{cr_prp.value} - {cr_prp.value}

Thanks for you help !!!!
 
You could try something like:

if {call_req.ref_num} = previous({call_req.ref_num}) then
{cr_prp.value} - previous({cr_prp.value})

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top