Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

custom counting field?

Posted on 2013-06-07
3
Medium Priority
?
246 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 2000 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
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…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

971 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