V_HTML := '<html><head><meta http-equiv="Content-Type" content="text/html; charset=GBK"></head>' ||
              '<body><H1>AR Invoice Report</H1><BR>' || 'Period: ' ||
              P_PERIOD_NAME || '<BR>' || 'Legal Entity: ' || P_LEGAL_ENTITY || '<BR>' || ' <BR>' ||
              '<table border=1 cellspacing=0 bordercolor=black frame=box>';
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT, V_HTML);    V_HTML := '<tr>
                 <th nowrap>Transaction Source</th>
                 <th nowrap>Transation Type</th>
                 <th nowrap>Transaction Number</th>
                 <th nowrap>CCL Transaction Source</th>
                 <th nowrap>CCL Transaction Type</th>
                 <th nowrap>CCL Management Entity</th>
                 <th nowrap>Transaction Date</th>
                 <th nowrap>Invoice Upload Date</th>
                 <th nowrap>Original Currency</th>
                 <th nowrap>Currency Rate Type</th>
                 <th nowrap>Currency Rate Date</th>
                 <th nowrap>Currency Rate</th>
                 <th nowrap>Customer Number(bill to)</th>
                 <th nowrap>Customer Name(bill to)</th>
                 <th nowrap>Customer Number(ship to)</th>
                 <th nowrap>Customer Name(ship to)</th>
                 <th nowrap>Payment Term</th>
                 <th nowrap>Reference</th>
                 <th nowrap>Attribute Context</th>
                 <th nowrap>Trans Reference1</th>
                 <th nowrap>Trans Reference2</th>
                 <th nowrap>Trans Reference3</th>
                 <th nowrap>Trans Reference4</th>
                 <th nowrap>Trans Reference5</th>
                 <th nowrap>Trans Reference6</th>
                 <th nowrap>Trans Reference7</th>
                 <th nowrap>Trans Reference8</th>
                 <th nowrap>Trans Reference9</th>
                 <th nowrap>Trans Reference10</th>
                 <th nowrap>Item Line Number</th>
                 <th nowrap>Line Item Description</th>
                 <th nowrap>Receivable Account</th>
                 <th nowrap>Line Amount</th>
                 <th nowrap>Outstanding Amount</th>
                 <th nowrap>CCL to provide list of units of measure</th>
                 <th nowrap>Tax Code</th>
                 <th nowrap>CONVERSION_RATE</th>
                 <th nowrap>Attribute Context</th>
                 <th nowrap>Line DFF1</th>
                 <th nowrap>Line DFF2</th>
                 <th nowrap>Line DFF3</th>
                 <th nowrap>Line DFF4</th>
                 <th nowrap>Line DFF5</th>
                 <th nowrap>Line DFF6</th>
                 <th nowrap>Line DFF7</th>
                 <th nowrap>Line DFF8</th>
                 <th nowrap>Flag</th>
              </tr>';
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT, V_HTML);
    
    BEGIN
      FOR REC_TRANSACTIONS IN AR_TRANSACTIONS (G_ORG_ID,G_SOB_ID,P_LEGAL_ENTITY,G_PERIOD_END_DATE) LOOP      
        V_HTML := '<tr><td nowrap>' || REC_TRANSACTIONS.BATCH_SOURCE_NAME || '</td>'
                         || '<td nowrap>' || REC_TRANSACTIONS.TRX_TYPE || '</td>'
                         || '<td nowrap>' || REC_TRANSACTIONS.TRX_NUMBER || '</td>'
                         || '<td nowrap>' || '' || '</td>'
                         || '<td nowrap>' || '' || '</td>'
                         || '<td nowrap>' || '' || '</td>'
                         || '<td nowrap>' || REC_TRANSACTIONS.TRX_DATE || '</td>'
                         || '<td nowrap>' || '' || '</td>'
                         || '<td nowrap>' || REC_TRANSACTIONS.INVOICE_CURRENCY || '</td>'
                         || '<td nowrap>' || REC_TRANSACTIONS.CURRENCY_RATE_TYPE || '</td>'
                         || '<td nowrap>' || REC_TRANSACTIONS.CURRENCY_RATE_DATE || '</td>'
                         || '<td nowrap>' || REC_TRANSACTIONS.CURRENCY_RATE || '</td>'
                         || '<td nowrap>' || REC_TRANSACTIONS.CUSTOMER_NUMBER || '</td>'
                         || '<td nowrap>' || REC_TRANSACTIONS.CUSTOMER_NAME || '</td>'
                         || '<td nowrap>' || '' || '</td>'
                         || '<td nowrap>' || '' || '</td>'
                         || '<td nowrap>' || REC_TRANSACTIONS.TERM_NAME || '</td>'
                         || '<td nowrap>' || REC_TRANSACTIONS.REFERENCE || '</td>'
                         || '<td nowrap>' || REC_TRANSACTIONS.TRANSACTION_REFERENCE1 || '</td>'
                         || '<td nowrap>' || REC_TRANSACTIONS.TRANSACTION_REFERENCE2 || '</td>'
                         || '<td nowrap>' || REC_TRANSACTIONS.TRANSACTION_REFERENCE3 || '</td>'
                         || '<td nowrap>' || REC_TRANSACTIONS.TRANSACTION_REFERENCE4 || '</td>'
                         || '<td nowrap>' || REC_TRANSACTIONS.TRANSACTION_REFERENCE5 || '</td>'
                         || '<td nowrap>' || REC_TRANSACTIONS.TRANSACTION_REFERENCE6 || '</td>'
                         || '<td nowrap>' || REC_TRANSACTIONS.TRANSACTION_REFERENCE7 || '</td>'
                         || '<td nowrap>' || REC_TRANSACTIONS.TRANSACTION_REFERENCE8 || '</td>'
                         || '<td nowrap>' || REC_TRANSACTIONS.TRANSACTION_REFERENCE9 || '</td>'
                         || '<td nowrap>' || REC_TRANSACTIONS.TRANSACTION_REFERENCE10 || '</td>'
                         || '<td nowrap>' || REC_TRANSACTIONS.TRANSACTION_REFERENCE11 || '</td>'
                         || '<td nowrap>' || REC_TRANSACTIONS.LINE_NUMBER || '</td>'
                         || '<td nowrap>' || REC_TRANSACTIONS.LINE_DESCRIPTION || '</td>'
                         || '<td nowrap>' || V_REC_ACCOUNT || '</td>'
                         || '<td nowrap>' || REC_TRANSACTIONS.LINE_AMOUNT || '</td>'
                         || '<td nowrap>' || V_Balance || '</td>'
                         || '<td nowrap>' || '' || '</td>'
                         || '<td nowrap>' || REC_TRANSACTIONS.TAX_CODE || '</td>'
                         || '<td nowrap>' || '' || '</td>'   
                         || '<td nowrap>' || REC_TRANSACTIONS.TRANS_DFF1 || '</td>'
                         || '<td nowrap>' || REC_TRANSACTIONS.TRANS_DFF2 || '</td>'
                         || '<td nowrap>' || REC_TRANSACTIONS.TRANS_DFF3 || '</td>'
                         || '<td nowrap>' || REC_TRANSACTIONS.TRANS_DFF4 || '</td>'
                         || '<td nowrap>' || REC_TRANSACTIONS.TRANS_DFF5 || '</td>'
                         || '<td nowrap>' || REC_TRANSACTIONS.TRANS_DFF6 || '</td>'
                         || '<td nowrap>' || REC_TRANSACTIONS.TRANS_DFF7 || '</td>'
                         || '<td nowrap>' || REC_TRANSACTIONS.TRANS_DFF8 || '</td>'
                         || '<td nowrap>' || REC_TRANSACTIONS.TRANS_DFF9 || '</td>'
                         || '<td nowrap>' || V_FLAG || '</td></tr>';        FND_FILE.PUT_LINE(FND_FILE.OUTPUT, V_HTML);        V_COUNT := V_COUNT + 1;
      END LOOP;
    EXCEPTION
       WHEN OTHERS THEN
           FND_FILE.PUT_LINE(FND_FILE.LOG,
                            'Error while fetching detail record!');
    END;    V_HTML := '</table></body></html>';
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT, V_HTML);    FND_FILE.PUT_LINE(FND_FILE.LOG,
                          'TOTAL_LINE :' || V_COUNT);  EXCEPTION
    WHEN OTHERS THEN
      ROLLBACK;
      RETCODE := 2;
      ERRBUF  := SQLCODE || ' ' || SQLERRM;
  END;
END AR_INVOICE_REPORT;
/
如上文(省略了部分代码),得到的报表,会出现:串格现象,应该换行<tr>却不换行的现象.
之前都是用BI publisher做报表,这种使用xml标签直接输出报表的第一次接触..
实在是找不到原因,请高人指点.xml