Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Record Select Formula Help Post Reply Post New Topic
Author Message
aeckaren
Newbie
Newbie
Avatar

Joined: 24 Jul 2012
Online Status: Offline
Posts: 26
Quote aeckaren Replybullet Topic: Record Select Formula Help
    Posted: 30 Aug 2012 at 8:39am
I have a table that contains address information for customer orders. When the address is changed for whatever reason, the system adds a new record to the table {oep45.seqn45} with a different sequence number (order number 12345 sequence 1, order number 12345 sequence 2, etc). There will be a new record added to the file each time the delivery address on the order is changed.

I need help creating a formula that will print only the latest record in the address file for a particular order. I can't specify which sequence to select because the table can have any number of records for a particular order depending on how many times the delivery address was changed in the system.

Any idea how I can do this? 

Thanks,

Karen
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 30 Aug 2012 at 9:29am
group on order number
sort on sequence number
palce the address filds in the groupo footer and it will print the last record for the group
 
or you can also use a suppress formula using the maximum(sequence,order) 
IP IP Logged
aeckaren
Newbie
Newbie
Avatar

Joined: 24 Jul 2012
Online Status: Offline
Posts: 26
Quote aeckaren Replybullet Posted: 30 Aug 2012 at 9:47am
Thanks for the reply.

I know that I can sort out and suppress the records that I don't want, but I'm having a problem with the value of the suppressed rows being calculated into the order total.

Any suggestions for that?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 30 Aug 2012 at 9:49am
use running totals or variable formulas to sum and count
IP IP Logged
aeckaren
Newbie
Newbie
Avatar

Joined: 24 Jul 2012
Online Status: Offline
Posts: 26
Quote aeckaren Replybullet Posted: 30 Aug 2012 at 9:51am
Okay. I think I got it. Grouping based on sequence and then the totals are correct.

Thanks!
IP IP Logged
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.016 seconds.