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

Help with on change of group formula

Status
Not open for further replies.

jvolden

IS-IT--Management
Jan 26, 2005
77
0
0
US
I am using Crystal Reports 11 and trying to write a formula that will assign a value to a field and then delete it on change of another field.

Deatils:
I'm grouping a report on Incident numbers
GH: Incident Number
D: Info
GF

I want a field to hold a certain value until the incident number changes. Here is the code in the field as of now:
datetimevar tt;
if "changed to Pending cust" in {activitym1.description}
then
tt:={activitym1.datestamp};

I would like the datestamp value to be held onto until changed or until the Incident number changes. Any ideas?

Thank you!
 
Generally it's best to post sample data and expected output.

Your formula doesn't address Incident numbers, so I'm not sure what you really want.

try something like this:

whileprintingrecords;
if {activitym1.datestamp} <> previous({activitym1.datestamp})
or
{activitym1.IncNum} <> previous({activitym1.IncNum})
then
<some action>
else
<other action>

-k
 
Create a second formula:

whileprintingrecords;
datetimevar tt := datetime(0,0,0,0,0,0);

Place this in the group header.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top