Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Invoice Numbers Post Reply Post New Topic
Author Message
Teddy555
Newbie
Newbie
Avatar

Joined: 23 Jan 2017
Online Status: Offline
Posts: 22
Quote Teddy555 Replybullet Topic: Invoice Numbers
    Posted: 22 Aug 2017 at 4:03am
Good day All ,

I have a situation where i needed to add the year of the transaction to the invoice number and that was fairly easy to accomplish. However , The company in which i am creating the report for seems to bill customers on a bi-weekly basis and the invoice numbers they use are formatted as for example :
                                       HOT157-1
                                       HOT157-2
                                       HOT157-3
With the inclusion of the year the invoice number looks like HOT157-12017.
Is there a way to get the first invoice number which would naturally be HOT1572017 rather than having the number for the other invoices regarding that customer ?


Any help would be appreciated .

Regards,
Teddy
T.Calderon
IP IP Logged
Teddy555
Newbie
Newbie
Avatar

Joined: 23 Jan 2017
Online Status: Offline
Posts: 22
Quote Teddy555 Replybullet Posted: 22 Aug 2017 at 4:20am
Basically I want to Delete every character after the hyphen . except the year of the transaction.
T.Calderon
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 22 Aug 2017 at 4:50am
Well it is not pretty, but I think this might work.

left({somestring},instr({somestring},'-'))+right({somestring},4)
IP IP Logged
Teddy555
Newbie
Newbie
Avatar

Joined: 23 Jan 2017
Online Status: Offline
Posts: 22
Quote Teddy555 Replybullet Posted: 25 Aug 2017 at 8:45am
thanks , i always end up posting then figuring it out on my own after . LOL
T.Calderon
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.018 seconds.