Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

custom counting field?

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

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 …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

765 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