function DisplayTable() {

    var tableContent = '';

    // Browse each report
    var reportCount = reportArray.length;
    for (var i = 0; i < reportCount; i++) {

        var currentReport = reportArray[i];

        // Prepare error column content
        var currentError = currentReport['errorMessage'];
        if (currentError != '') {
            currentError = '        <img src="/kurt-web/ihm/bt-error-' + currentReport['errorType'].toLowerCase()
                + '.png" onclick="parent.Dialog(\'Erreur\',\'' + currentError
                + '\')" title="Afficher le message" style="cursor:pointer; width:16px; height:16px;"/>\n';
        }

        // Prepare status column content
        var currentStatus = currentReport['state'];
        if (currentStatus != '') {
            currentStatus = '        <img src="/kurt-web/ihm/state_' + currentStatus.toLowerCase()
                + '.png" width="100" height="18">';
        }

        var currentDownload = currentReport['fileName'];
        if (currentDownload != '') {
            currentDownload = '<a href="/kurt-web/downloadServlet?filepath=' + currentDownload + '&reportUid='
                + currentReport['reportUid']
                + '" target="_blank"><img src="/kurt-web/ihm/bt-save.png" width="16" height="16" border="0"></a>\n';
        }

        /* Display columns of the current report */
        tableContent += '<tr>\n';
        tableContent += '    <td class="reportTable"><strong>' + reportArray[i]['reportCode'] + '</strong></td>\n';
        tableContent += '    <td class="reportTable">' + reportArray[i]['requestDate'] + '</td>\n';
        tableContent += '    <td class="reportTable">' + reportArray[i]['startGenerationDate'] + '</td>\n';
        tableContent += '    <td class="reportTable">' + reportArray[i]['endGenerationDate'] + '</td>\n';
        tableContent += '    <td class="reportTable">';
        tableContent += '        <img src="/kurt-web/ihm/bt-search.png" onclick="parent.Dialog(\'Crit&egrave;res\',\'<IFRAME src=/kurt-web/frames/criteria.jsp?reportUid='
            + currentReport['reportUid']
            + ' width=350 frameBorder=0></IFRAME>\')" title="Afficher les crit&egrave;res" style="cursor:pointer;width:16px;height:16px;"/>\n';
        tableContent += currentError + ' ' + currentDownload + '    </td>\n';
        tableContent += '    <td class="reportTable">' + currentStatus + '</td>\n';
        tableContent += '</tr>';
    }
    document.write(tableContent);
}

/* Redirect to page */
function GoPage(i) {
    document.location.href = '/kurt-web/frames/my_reports.jsp?page=' + i;
}
