Print Page | Close Window

Invoice Numbers

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22417
Printed Date: 02 May 2024 at 6:15am


Topic: Invoice Numbers
Posted By: Teddy555
Subject: Invoice Numbers
Date 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



Replies:
Posted By: Teddy555
Date 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


Posted By: kevlray
Date 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)


Posted By: Teddy555
Date Posted: 25 Aug 2017 at 8:45am
thanks , i always end up posting then figuring it out on my own after . LOL

-------------
T.Calderon



Print Page | Close Window