That expression is used to number your records in your subreport in a way that when rendering across then down, it actually seems like you are rendering down then across. You want the sequence of numbers to be generated so the first record is always given the lowest number. The next lowest number will be 1 record past the middle. The third record would actually be the second in the original sort.

I built a spreadsheet in Excel to determine what the expression would be to create new sequence numbers for each record in the record source. I have done this several times in the past but I always forget the calculations. It took some trial and error which is why my post was at 1:33 AM

.

Thanks for putting so much effort into this, but it still doesn't make sense to me. First of all, there's a "ORDER BY SortColumn" clause missing from the SQL. And then I think the syntax of the Mod part is incorrect and "*0.001" probably belongs inside the last parenthesis:

(([ItemID] - 1)

** * (MOD(DCount("*","tblItems"), 2)****)**)+ Int(([itemID] - 1) / (DCount("*","tblItems") / 2)

** * 0.001**)

But even so, assuming the record count is 5 and the first two ItemIDs are 1 and 2, I think the value for SortColumn would work out like this:

((1 - 1) * (MOD(5, 2))) + INT((1 - 1) / (5 / 2) * 0.001)

(0 * 1) + INT(0 / 2.5 * 0.001)

0 + 0 = 0

((2 - 1) * (MOD(5, 2))) + INT((2 - 1) / (5 / 2) * 0.001)

(1 * 1) + INT(1 / 2.5 * 0.001)

1 + 0 = 1

I'm making a few assumptions about what you meant, but this is how I interpreted it and it wouldn't change the sort order.

The values in ItemID and SortColumn should line up like this...

1 1

2 3

3 5

4 2

5 4

... in order for the ItemID to sort like this (across, then down):

1 4

2 5

3

Please let me know if I'm misunderstanding something.