Variable starting point for a crosstab?

Hi Experts!
I have a crystal report that has a mock crosstab with 48 spaces.
Techs use this as a plate map for testing samples.  Each batch can have up to 47 samples (first cell is always a control).  
I need to be able to put the sample ID in the correct space but have not been able to do that so far because the batch does not always start on cell #2.  If the plate has cells that are not suitable for testing, they can start a batch on the next available cell, like cell number 22, for instance.
How can I possibly place the correct ID's in the correct cells whey they're starting at random numbers?  I created a table with 48 numbers as "cell addresses" and have a parameter called "First Cell" for the tech to enter the first cell they are using but I can't seem to get any further - how do I link the two??
Any attempt I've made to use *next* function works great on first and second values, but doesn't go anymore.  The ID's are alphanumeric so i can't really use +1.  I've also tried creating arrays and then calling each element out one by one but that's not working well either.
This mock table is in the report footer.
Any help is much appreciated!
Lucy GomesAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Lucy GomesAuthor Commented:
A bit more on what I've tried:
I was thinking of creating 47 formulas, one for each potential sample ID.
First usable cell is 2 so:  
if {?Starting Cell} = 2 then
stringvar array arr;
else ''

For Cell 3:

if {?Starting Cell} = 3
        if length ({@two}) < 2
        stringvar array arr[2]


//second cell on table so this can only go three ways:
//is it the first cell used? yes - then show first ordno.
//if it's not the first cell, then is there a value in previous cell (@two)?
    //no - so it's not the first cell and there is no value in previous cell - leave blank.
    //yes - show the second value in the array (second ordno)
and that's where I hit a wall.  What I really want to to do is say - look at previous cell formula and show me the next sample ID.
Mike McCrackenSenior ConsultantCommented:
Can you upload the report?

Lucy GomesAuthor Commented:
Sure, it's a mess, but here's the report.

Learn SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Lucy GomesAuthor Commented:
Oops, let's try that again.
Mike McCrackenSenior ConsultantCommented:
SO if the starting cell is 22 the next sample goes on cell 23 then 24, 25, 26 etc?

Is A1-2 cell 1?
Is A3-4 cell 2?
Is that how the cell numbering goes
Across then down?

Group 1 is the test number or run number?
Group 2 is for each cell tested?

What will they enter for the first cell? a number like 2, 12, 24, etc?

How about this idea?

Instead of building the array with each new element create a 48 element array initialized to blanks

IN the report header add a formula to declare the variables

Name - zDeclareVariables
Global StringVar Array strOut;
Global NumberVar NextCell;
ReDim strOut[48];
NextCell := {?Starting Cell};

Open in new window

IN the Group2 Header add a formula to set the array values
Name - zUpdateArray
Global StringVar Array strOut;
Global NumberVar NextCell;

strOut[NextCell] := {ORDTASK.ORDNO};
NextCell := NextCell + 1;

Open in new window

IN each cell add a formula to display the appropriate array element.  Replace NN with the cell number like 2, 3, 22, etc
Name - zDisplayCellNN
Global StringVar Array strOut;

Open in new window

SO zDisplayCell02 is
Global StringVar Array strOut;

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Lucy GomesAuthor Commented:
Oh my goodness!!!!!!!!!!!!!!!

It works perfectly!!!  I wish I could convey how much I appreciate your help on this!  Totally just made my week, maybe month!!
I've been battling this report for days.

Thank you, thank you, thank you!

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.