Dear all,
when I try to export to excel, I am getting a error named "Excel Buffer already Exists. Identification fields and values: Row no = '1' and Column No = '1'
This
error I am getting only when i try to export to excel
with & without giving any filter for "Excise Entry" DataItem.
I have also tried to set Temporary to Yes of Excel Buffer. Then Report running without any error but export to excel not working.
what may be the reason for this.
Is anybody has any idea please let me know.
Thanks in advance.
Below is my report code:-
On Excise Entry Date Item:-
EnterCell(RowNo : Integer;ColumnNo : Integer;CellValue : Text[250];Bold : Boolean;UnderLine : Boolean)
TempExcelBuffer2.INIT;
TempExcelBuffer2.VALIDATE("Row No.",RowNo);
TempExcelBuffer2.VALIDATE("Column No.",ColumnNo);
TempExcelBuffer2."Cell Value as Text" := CellValue;
TempExcelBuffer2.Formula := '';
TempExcelBuffer2.Bold := Bold;
TempExcelBuffer2.Underline := UnderLine;
TempExcelBuffer2.INSERT;
MakeExcelDataHeader()
RowNo+=1;
EnterCell(RowNo,2,'Document No.',TRUE,FALSE);
EnterCell(RowNo,3,'Posting Date',TRUE,FALSE);
EnterCell(RowNo,4,'Sell-to/Buy-from No.',TRUE,FALSE);
EnterCell(RowNo,5,'Item No.',TRUE,FALSE);
EnterCell(RowNo,6,'Quantity',TRUE,FALSE);
EnterCell(RowNo,7,'Amount',TRUE,FALSE);
EnterCell(RowNo,8,'BED %',TRUE,FALSE);
EnterCell(RowNo,9,'PurchInvLine."Assessable Value"',TRUE,FALSE);
EnterCell(RowNo,10,'BED Amount',TRUE,FALSE);
EnterCell(RowNo,11,'BCD Amount',TRUE,FALSE);
EnterCell(RowNo,12,'ADC VAT Amount',TRUE,FALSE);
EnterCell(RowNo,13,'eCess Amount',TRUE,FALSE);
EnterCell(RowNo,14,'SHE Cess Amount',TRUE,FALSE);
EnterCell(RowNo,15,'Custom eCess Amount',TRUE,FALSE);
EnterCell(RowNo,16,'Custom SHECess Amount',TRUE,FALSE);
On Excise Entry Body Section :-
Excise Entry, Body (2) - OnPreSection()
IF "Export To Excel" THEN BEGIN
RowNo += 1;
EnterCell(RowNo,2,FORMAT("Document No."),FALSE,FALSE);
EnterCell(RowNo,3,FORMAT("Posting Date"),FALSE,FALSE);
EnterCell(RowNo,4,FORMAT("Sell-to/Buy-from No."),FALSE,FALSE);
EnterCell(RowNo,5,FORMAT("Item No."),FALSE,FALSE);
EnterCell(RowNo,6,FORMAT(Quantity),FALSE,FALSE);
EnterCell(RowNo,7,FORMAT(Amount),FALSE,FALSE);
EnterCell(RowNo,8,FORMAT("BED %"),FALSE,FALSE);
EnterCell(RowNo,9,FORMAT(PurchInvLine."Assessable Value"),FALSE,FALSE);
EnterCell(RowNo,10,FORMAT("BED Amount"),FALSE,FALSE);
EnterCell(RowNo,11,FORMAT("BCD Amount"),FALSE,FALSE);
EnterCell(RowNo,12,FORMAT("ADC VAT Amount"),FALSE,FALSE);
EnterCell(RowNo,13,FORMAT("eCess Amount"),FALSE,FALSE);
EnterCell(RowNo,14,FORMAT("SHE Cess Amount"),FALSE,FALSE);
EnterCell(RowNo,15,FORMAT("Custom eCess Amount"),FALSE,FALSE);
EnterCell(RowNo,16,FORMAT("Custom SHECess Amount"),FALSE,FALSE);
END;
Excise Entry, Body (2) - OnPostSection()
EnterCell(RowNo : Integer;ColumnNo : Integer;CellValue : Text[250];Bold : Boolean;UnderLine : Boolean)
TempExcelBuffer2.INIT;
TempExcelBuffer2.VALIDATE("Row No.",RowNo);
TempExcelBuffer2.VALIDATE("Column No.",ColumnNo);
TempExcelBuffer2."Cell Value as Text" := CellValue;
TempExcelBuffer2.Formula := '';
TempExcelBuffer2.Bold := Bold;
TempExcelBuffer2.Underline := UnderLine;
TempExcelBuffer2.INSERT;
MakeExcelDataHeader()
RowNo+=1;
EnterCell(RowNo,2,'Document No.',TRUE,FALSE);
EnterCell(RowNo,3,'Posting Date',TRUE,FALSE);
EnterCell(RowNo,4,'Sell-to/Buy-from No.',TRUE,FALSE);
EnterCell(RowNo,5,'Item No.',TRUE,FALSE);
EnterCell(RowNo,6,'Quantity',TRUE,FALSE);
EnterCell(RowNo,7,'Amount',TRUE,FALSE);
EnterCell(RowNo,8,'BED %',TRUE,FALSE);
EnterCell(RowNo,9,'PurchInvLine."Assessable Value"',TRUE,FALSE);
EnterCell(RowNo,10,'BED Amount',TRUE,FALSE);
EnterCell(RowNo,11,'BCD Amount',TRUE,FALSE);
EnterCell(RowNo,12,'ADC VAT Amount',TRUE,FALSE);
EnterCell(RowNo,13,'eCess Amount',TRUE,FALSE);
EnterCell(RowNo,14,'SHE Cess Amount',TRUE,FALSE);
EnterCell(RowNo,15,'Custom eCess Amount',TRUE,FALSE);
EnterCell(RowNo,16,'Custom SHECess Amount',TRUE,FALSE);
Regards,
Neel