Solved

custom counting field?

Posted on 2013-06-07
3
236 Views
Last Modified: 2013-06-07
Good morning!
I have a report that shows specimens that are to be tested.
Specimens are counted and listed as 1, 2, 3, 4, etc.
One of our techs wants this worksheet to match the screen on her equipment which lists the samples as
1a, 1b, 1c, 2a, 2b, 2c, 3a, 3b, 3c, etc.

How do I change my detail section where i have my records listed to match that?
I started to use
if recordnumber = 1 then '1a' else
if recordnumber = 2 then '1b' else
if recordnumber = 3 then '1c' else

but I just found out they can do an infinite number of samples so this formula could get really long, really quick.  Is there an easier, dynamic way of doing the same thing?

Thank you for any help you're able to give me!
0
Comment
Question by:CAHFS
  • 2
3 Comments
 
LVL 18

Accepted Solution

by:
vasto earned 500 total points
ID: 39229688
try this formula:

numbervar intVar := recordnumber ;
select (intVar) MOD 3
case 1:totext(1+int((intVar)/3),"0") & 'a'
case 2: totext(1+int((intVar)/3),"0") & 'b'
case 0: totext(int((intVar)/3),"0") & 'c'
0
 

Author Closing Comment

by:CAHFS
ID: 39229705
Thank you, that worked perfectly!!!

thank you, thank you, thank you!
0
 
LVL 18

Expert Comment

by:vasto
ID: 39229723
Glad I could help.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Crystal Report 2008 script 4 44
Converting int to currency 5 23
String to Date Formula Failure 2 38
Crystal Reports 9 and Subreports 3 36
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now