Getting current record number in report using Weekly.html

SO, I have been hacking away at the ‘Weekly.html’ report that is in the
rt-addons directory, and I am SO close to getting it to do what I want, but
I am stuck on one thing. I need to get the current record number, since I
want to do something different for the first record, versus the rest, so I
would like to do something like the following:

if first_record
do something
else
do something different
endif

The area of code I am looking at is here:
%while (my $trans = $transes->Next) {
% if ($trans->Type =~ /Create|Comment|Correspond/) {
<%$transes->Count%>


<%$trans->Created%> <%$trans->Type%> by: <%$trans->CreatorObj->RealName%>

<%$trans->Content%>
% } % }

% }

As you can see, I can get the total number of records with the
$transes->Count, but I can’t seem to get the current record number. I
assume from looking at the SearchBuilder.pm that it is related to
_ItemCounter, but I can’t seem to grok how to achieve it. I have tried
changing the above to $transes->ItemCounter, and variations.

I am NOT a developer, just a bad hacker. I know some perl, and I have
pretty much understood most of what is going on there, but I just can’t
seem to make the next connection. If someone can give me a pointer or two
as to what I am missing, I would greatly appreciate it.

Thanks
Tom

I need to get the current record number, since I want to do something
different for the first record, versus the rest

[-- snip --]

The area of code I am looking at is here:
%while (my $trans = $transes->Next) {
% if ($trans->Type =~ /Create|Comment|Correspond/) {
<%$transes->Count%>


<%$trans->Created%> <%$trans->Type%> by: <%$trans->CreatorObj->RealName%>

<%$trans->Content%>
% } % }

Try something like:

% my $transaction_number = 1;
% while (my $trans = $transes->Next) {
% if ($transaction_number == 1) {
% # Do you first transaction stuff
% }
% $transaction_number++;
% if ($trans->Type =~ /Create|Comment|Correspond/) {
<%$transes->Count%>


<%$trans->Created%> <%$trans->Type%> by: <%$trans->CreatorObj->RealName%>

<%$trans->Content%>
% } % }

$transaction_number is 1 only the first time through.

(darren)

Your only obligation in any lifetime is to be true to yourself. Being
true to anyone else or anything else is … impossible.
– Richard Bach