Hello,
I'm trying to create a report that will export to Excel (my first try at this). A very simple report with just six columns. I've copied code from a report that already was set up to export and modified it. The end result is an error:
The Excel Buffer already exists.
Identification fields and values:
Row No.='1',Column No.='1'
When running the debugger, it shows and "insert" in table 370 as the problem.
There are 5 functions copied:
MakeExcelInfo
MakeExcelDataHeader
MakeExcelCustHeader
MakeExcelDataBody
CreateExcelbook
The code in all but MakeExcelDataBody and createExcelBook have been remmed out.
This is the MakeExcelDataBody code (for testing, I want only the first column)
ExcelBuf.NewRow;
ExcelBuf.AddColumn(Item."No.",FALSE,'',TRUE,FALSE,FALSE,'');
This is the CreateExcelBook code:
ExcelBuf.CreateBook;
ExcelBuf.CreateSheet('Customer','Unit Sales Report',COMPANYNAME,USERID);
ExcelBuf.GiveUserControl;
ERROR('');
There are five sections to the report:
Header1
Body2
GroupFooter1
Footer2
Footer3
The data I want to export is in groupfooter1 where I have added this code to the presection:
IF (PrinttoExcel)THEN
MakeExcelDataBody();
I also added code to OnPostReport
IF PrinttoExcel THEN
CreateExcelbook;
Any suggestions on where I went wrong with this?
Thank you.
JNM
Comments
FD Consulting
I Have also got the same error many times; If the error is exist then i will go the Excel buffer table then i will delete all the records.
Is this the only way to achieve error free? ](*,)
srinivas
"Delighting Customers.... Through Delivery Excellence" .
Use NDT to find all occurences of T370 in reports. It will also list whether the records are temporary or not. Makes it rather easy to find the inorrect ones.
FD Consulting
Where is ExcelBuf set to temporary?
Thanks for the help!
http://dynamicsuser.net/forums/p/25998/140880.aspx
.
.
.
.
.
http://savatage99.googlepages.com/Excel ... ummies.doc
http://www.mibuso.com/dl.asp?FileID=596&Type=file
http://savatage99.googlepages.com/50095 ... oExcel.fob
http://savatage99.googlepages.com/Repor ... ToExce.txt
http://savatage99.googlepages.com/50085 ... oExcel.fob
http://savatage99.googlepages.com/Repor ... elExpo.txt
http://savatage99.googlepages.com/Repor ... el_2.0.fob
http://www.BiloBeauty.com
http://www.autismspeaks.org
i have completed the task.
The error was removed by setting the excelbuf variable's property(Excelbuff) to temporary-Yes