Hi everyone,
I am trying to export some data to excel…
I want the data displayed this way:
No. 5
First Name John
I’ve written a function MakeExcelDataHeader() that generates the data header in the Excel file and called it in the OnPreReport() trigger:
ExcelBuf.AddColumn(Employee.FIELDCAPTION("No."),FALSE,'',TRUE,FALSE,TRUE,'');
ExcelBuf.NewRow;
ExcelBuf.AddColumn(Employee.FIELDCAPTION("First Name"),FALSE,'',TRUE,FALSE,TRUE,'');
where ExcelBuf is a record of type Excel Buffer…
I’ve also written a function MakeExcelDataBody() that generates the data body in the Excel file and called it in the Employee - OnAfterGetRecord() trigger:
ExcelBuf.AddColumn(Employee."No.",FALSE,'',TRUE,FALSE,TRUE,'');
ExcelBuf.NewRow;
ExcelBuf.AddColumn(Employee."First Name",FALSE,'',TRUE,FALSE,TRUE,'');
The problem is that I get the data displayed this way:
No.
First Name
5
John
What shall I do to get the data displayed the way I want???