Hi,
I need to create a sheet for whenever there appears the Group header section report, e.g. if the payment method code of customer changes, the sheet must be change too.
I'm trying with the following code in OnPresection Group Header and in OnPostSection, but it doesn't work fine.
ExcelBuf.CreateBook;
ExcelBuf.AddSheet;
ExcelBuf.CreateSheet(FORMAT ("Payment Method Code"),FORMAT ("Payment Method Code"),COMPANYNAME(),USERID());
ExcelBuf.DELETEALL;
Thanks!!
0
Comments
Write this in onpre of dataitem
ExcelBuf.CreateBook;
Writer this in onaftergetrecord of data item
ExcelBuf.DELETEALL;
ExcelBuf.AddSheet;
Write this is on on post section of groupheader
ExcelBuf.CreateSheet(FORMAT ("Payment Method Code"),FORMAT ("Payment Method Code"),COMPANYNAME(),USERID());
it may work or best way is active the debugger.
Pranav
Pranav Joshi
MS Dynamics NAV Consultant
SBS Group Desert Mountain (Formerly Silverware Inc.)
Hanen TALBI