Solved

custom counting field?

Posted on 2013-06-07
3
237 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Crystal Reports Date Formula Failure 26 94
Crystal Reports Sub Report 4 79
Crystal Reports Sum only working when drilling down 20 44
Crystal reports vb.net 2 7
Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

910 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

21 Experts available now in Live!

Get 1:1 Help Now