Hi,
while running a report, i am getting below error…
EXCEL BUFFER ALREADY EXIST"
IDENTIFICATION FIELDS AND VALUES
ROW NO:= 1, COLUMN NO =4
Any Idea…?
Hi,
while running a report, i am getting below error…
EXCEL BUFFER ALREADY EXIST"
IDENTIFICATION FIELDS AND VALUES
ROW NO:= 1, COLUMN NO =4
Any Idea…?
you are not incrementing the rowID while filling excelbuffer table.
Write
RowNo := RowNo + 1;
After the First row export…
where…?
before enterexcel function
I created the function “ENTERCELL”…and declared local variables
can you show us the code?
increment the rowid variable before the function only
I did it…again it is coming error
now need to look at your code…
onpreReport() triger
just add this code.
ExcelBuffer.DELETEALL;
Regards,
Shailesh
Make sure you have set Temporary preoperty to yes for ExcelBuf variable
I HAVE CHECKED ALL THE CODES…BUT STILL THE SAME ERROR IS COMING
Cant you?
GLOBAL VARIABLES :
Name DataType Subtype Length
srno Text 30
sno Integer
ExcelBuf Record Excel Buffer
PrintToExcel Boolean
Row Integer
cnt Boolean
FUNCTIONS:
ENTERCELL ======> LOCAL VARIABLE :
Var Name DataType Subtype Length
RowNo Integer
ColumnNo Integer
CellValue Text 250
Bold Boolean
Underline Boolean
MergeCell Text 30
NumberFormat Text 30
DATA ITEM :PURCHASE HEADER, PUECHASE LINE…
EnterCell(RowNo : Integer;ColumnNo : Integer;CellValue : Text[250];Bold : Boolean;Underline : Boolean;MergeCell : Text[30];NumberFormat
ExcelBuf.INIT;
ExcelBuf.VALIDATE(“Row No.”, RowNo);
ExcelBuf.VALIDATE(“Column No.”,ColumnNo);
ExcelBuf.“Cell Value as Text” := CellValue;
ExcelBuf.Formula := ‘’;
ExcelBuf.Bold := Bold;
ExcelBuf.Underline := Underline;
ExcelBuf.NumberFormat := NumberFormat;
ExcelBuf.INSERT;
Report - OnPreReport()
IF PrintToExcel THEN
ExcelBuf.DELETEALL;
EnterCell(1, 4, ‘WORK ORDER DETAILS’, TRUE, TRUE, ‘’,’’);
Report - OnPostReport()
IF PrintToExcel THEN BEGIN
ExcelBuf.RESET;
ExcelBuf.CreateBook;
ExcelBuf.CreateSheet(‘WORK ORDER’,‘WORK ORDER’,COMPANYNAME,USERID);
ExcelBuf.GiveUserControl;
END;
Purchase Header, Header (1) - OnPostSection()
IF PrintToExcel THEN BEGIN
Row:=5;
EnterCell(Row,1,‘S.NO.’,TRUE,FALSE,’’,’’);
EnterCell(Row,2,‘WORK ORDER NO.’,TRUE,FALSE,’’,’’);
EnterCell(Row,3,‘DATE’,TRUE,FALSE,’’,’’);
EnterCell(Row,4,‘VENDOR CODE’,TRUE,FALSE,’’,’’);
EnterCell(Row,5,‘VENDOR NAME’,TRUE,FALSE,’’,’’);
EnterCell(Row,6,‘JOB/SERVICES ORDERED’,TRUE,FALSE,’’,’’);
EnterCell(Row,7,‘UOM’,TRUE,FALSE,’’,’’);
EnterCell(Row,8,‘QTY.’,TRUE,FALSE,’’,’’);
EnterCell(Row,9,‘BASIC PRICE’,TRUE,FALSE,’’,’’);
EnterCell(Row,10,‘TAXES’,TRUE,FALSE,’’,’’);
EnterCell(Row,11,‘OTHER CHARGES’,TRUE,FALSE,’’,’’);
EnterCell(Row,12,‘TOTAL W.O. AMT.’,TRUE,FALSE,’’,’’);
EnterCell(Row,13,‘WORK ORDER STATUS’,TRUE,FALSE,’’,’’);
Row+=1;
END;
Purchase Line, Body (1) - OnPostSection()
IF PrintToExcel THEN BEGIN
EnterCell(Row,1,FORMAT(sno),FALSE,FALSE,’’,’’);
EnterCell(Row,2,“Purchase Header”.“No.”,FALSE,FALSE,’’,’’);
EnterCell(Row,3,FORMAT(“Purchase Header”.“Order Date”),FALSE,FALSE,’’,’’);
EnterCell(Row,4,“Purchase Header”.“Buy-from Vendor Name”,FALSE,FALSE,’’,’’);
EnterCell(Row,5,“Purchase Header”.“Pay-to Name”,FALSE,FALSE,’’,’’);
EnterCell(Row,6,“Purchase Line”.Description,FALSE,FALSE,’’,’’);
EnterCell(Row,7,“Purchase Line”.“Unit of Measure”,FALSE,FALSE,’’,’’);
EnterCell(Row,8,FORMAT(“Purchase Line”.Quantity),FALSE,FALSE,’’,’’);
EnterCell(Row,9,FORMAT(“Purchase Line”.“Direct Unit Cost”),FALSE,FALSE,’’,’’);
EnterCell(Row,10,FORMAT(“Purchase Line”.“Tax Amount”),FALSE,FALSE,’’,’’);
EnterCell(Row,11,FORMAT(“Purchase Line”.“Charges To Vendor”),FALSE,FALSE,’’,’’);
EnterCell(Row,12,FORMAT(“Purchase Line”.“Amount To Vendor”),FALSE,FALSE,’’,’’);
EnterCell(Row,13,FORMAT(“Purchase Line”.Status),FALSE,FALSE,’’,’’);
Row+=1;
END;
Did you set temporary property yes for excelbuff?
Use
IF PrintToExcel THEN BEGIN
ExcelBuf.DELETEALL;
EnterCell(1, 4, ‘WORK ORDER DETAILS’, TRUE, TRUE, ‘’,’’);
END;
Make ExcelBuf as Temporary Table
Go to Global Variable
Click on ExcelBuf variable Press SHIFT+F4 and U will see properties Temporary
Set to Yes
Sorry Mohana I haven’t see your post.
On the header you force a start position
Row:=5;
On the line you don’t?
try to add row:= 10; or something to see if that fixes the issue.
i think you have defined excelbuff clear stmt twice remove it at one place.
make the variable ExcelBuf temporary i.e go to the properties of variable and set temporary = yes
For going to the properties click on variable and then press shift + f4
all da bst…