%# Distress, n.:
%# 	A disease incurred by exposure to the prosperity of a friend.
%# 		-- Ambrose Bierce, "The Devil's Dictionary"

<% loc($Item->Name) %>
<& /RG/Elements/Select,
    Name	=> $Item->Att,
    Choices	=> [ map $_->Id, @{$List->ItemsArrayRef||[]} ],
    Loc		=> sub { $List->DescribeReport($_[0]) },
    Default	=> '(' . loc('Please Select') . ')',
    Current	=> $Current &>

<%INIT>
my $List = RTx::Reports->new($session{CurrentUser});
if (my $id = $session{reportId}) {
    $List->Limit( FIELD => 'Id', OPERATOR => '!=', VALUE => $id );
}
else {
    $List->UnLimit;
}
$List->OrderBy( FIELD => 'Id' );
</%INIT>
<%ARGS>
$Item
$Current
</%ARGS>
