void clicked()
{
#AviFiles
SysOperationProgress progress = new SysOperationProgress();
SysExcelApplication sysExcelApplication;
SysExcelWorkbook sysExcelWorkbook;
SysExcelWorkbooks sysExcelWorkbooks;
SysExcelWorksheets sysExcelWorksheets;
SysExcelWorksheet sysExcelWorksheet;
SysExcelCell sysExcelCell;
SysExcelCells sysExcelCells;
SysExcelStyles sysExcelStyles;
SysExcelStyle sysExcelStyle;
SysExcelFont sysExcelFont;
SalesTable salesTable1;
SalesLine salesLine1;
InventDim inventDim1;
InventTable inventTable;
CustTable custTable;
DirPartyTable dirPartyTable;
int row;
sysExcelApplication = sysExcelApplication::construct();
sysExcelWorkbooks = sysExcelApplication.workbooks();
sysExcelWorkbook = sysExcelWorkbooks.add();
sysExcelWorksheets = sysExcelWorkbook.worksheets();
sysExcelWorksheet = sysExcelWorksheets.itemFromNum(1);
sysExcelCells = sysExcelWorksheet.cells();
sysExcelStyles = sysExcelWorkBook.styles();
sysExcelStyle = sysExcelStyles.add("Header");
sysExcelFont = sysExcelStyle.font();
sysExcelFont.bold(true);
sysExcelFont.color(WINapi::RGB2int(251,0,0));
sysExcelCells .range('A:A').numberFormat('@');
sysExcelCell= sysExcelCells.item(1,1);
sysExcelCell.value("SalesOrder");
sysExcelCell = sysExcelCells.item(1,2);
sysExcelCell.value("Customer Account");
sysExcelCell= sysExcelCells.item(1,3);
sysExcelCell.value("Name");
sysExcelCell= sysExcelCells.item(1,4);
sysExcelCell.value("Customer Group");
sysExcelCell= sysExcelCells.item(1,5);
sysExcelCell.value("Currency");
sysExcelCell= sysExcelCells.item(1,6);
sysExcelCell.value("Item number");
sysExcelCell= sysExcelCells.item(1,7);
sysExcelCell.value("Product name");
sysExcelCell= sysExcelCells.item(1,8);
sysExcelCell.value("Quantity");
sysExcelCell= sysExcelCells.item(1,9);
sysExcelCell.value("Unit Price");
sysExcelCell= sysExcelCells.item(1,10);
sysExcelCell.value("site");
sysExcelCell= sysExcelCells.item(1,11);
sysExcelCell.value("Warehouse");
sysExcelCell= sysExcelCells.item(1,12);
sysExcelCell.value("Delivery name");
sysExcelCell= sysExcelCells.item(1,13);
sysExcelCell.value("Delivery address");
row = 1;
select salesTable1 join salesLine1 join inventDim1 where salesTable1.SalesId == SalesTable_SalesId.valueStr()
&& salesLine1.SalesId == salesTable1.SalesId
&& inventDim1.inventDimId == salesLine1.InventDimId;
// && inventTable.ItemId == salesLine1.ItemId
{
progress.setCaption("Export To Excel in progress...");
progress.setAnimation(#AviUpdate);
progress.setText(strfmt("creating line for Item %1", row));
row++;
sysExcelCell = sysExcelCells.item(row , 1);
sysExcelCell.value(salesTable1.SalesId);
sysExcelCell = sysExcelCells.item(row,2);
sysExcelCell.value(salesTable1.CustAccount);
sysExcelCell = sysExcelCells.item(row , 3);
sysExcelCell.value(salesTable1.SalesName);
sysExcelCell = sysExcelCells.item(row , 4);
sysExcelCell.value(salesTable1.CustGroup);
sysExcelCell = sysExcelCells.item(row , 5);
sysexcelcell.value(salesTable1.CurrencyCode);
sysExcelCell = sysExcelCells.item(row , 6);
sysExcelCell.value(salesLine1.ItemId);
sysExcelCell = sysExcelCells.item(row , 7);
sysExcelCell.value(salesLine1.itemName());
sysExcelCell = sysExcelCells.item(row , 8);
sysExcelCell.value(salesLine1.SalesQty);
sysExcelCell = sysExcelCells.item(row , 9);
sysExcelCell.value(salesLine1.SalesPrice);
sysExcelCell = sysExcelCells.item(row , 10);
sysExcelCell.value(inventDim1.InventSiteId);
sysExcelCell = sysExcelCells.item(row , 11);
sysExcelCell.value(inventDim1.InventLocationId);
sysExcelCell = sysExcelCells.item(row , 12);
sysExcelCell.value(salesLine1.DeliveryName);
sysExcelCell = sysExcelCells.item(row , 13);
sysExcelCell.value(salesLine1.deliveryAddress().Address);
}
sysExcelApplication.visible(true);
super();
}
{
#AviFiles
SysOperationProgress progress = new SysOperationProgress();
SysExcelApplication sysExcelApplication;
SysExcelWorkbook sysExcelWorkbook;
SysExcelWorkbooks sysExcelWorkbooks;
SysExcelWorksheets sysExcelWorksheets;
SysExcelWorksheet sysExcelWorksheet;
SysExcelCell sysExcelCell;
SysExcelCells sysExcelCells;
SysExcelStyles sysExcelStyles;
SysExcelStyle sysExcelStyle;
SysExcelFont sysExcelFont;
SalesTable salesTable1;
SalesLine salesLine1;
InventDim inventDim1;
InventTable inventTable;
CustTable custTable;
DirPartyTable dirPartyTable;
int row;
sysExcelApplication = sysExcelApplication::construct();
sysExcelWorkbooks = sysExcelApplication.workbooks();
sysExcelWorkbook = sysExcelWorkbooks.add();
sysExcelWorksheets = sysExcelWorkbook.worksheets();
sysExcelWorksheet = sysExcelWorksheets.itemFromNum(1);
sysExcelCells = sysExcelWorksheet.cells();
sysExcelStyles = sysExcelWorkBook.styles();
sysExcelStyle = sysExcelStyles.add("Header");
sysExcelFont = sysExcelStyle.font();
sysExcelFont.bold(true);
sysExcelFont.color(WINapi::RGB2int(251,0,0));
sysExcelCells .range('A:A').numberFormat('@');
sysExcelCell= sysExcelCells.item(1,1);
sysExcelCell.value("SalesOrder");
sysExcelCell = sysExcelCells.item(1,2);
sysExcelCell.value("Customer Account");
sysExcelCell= sysExcelCells.item(1,3);
sysExcelCell.value("Name");
sysExcelCell= sysExcelCells.item(1,4);
sysExcelCell.value("Customer Group");
sysExcelCell= sysExcelCells.item(1,5);
sysExcelCell.value("Currency");
sysExcelCell= sysExcelCells.item(1,6);
sysExcelCell.value("Item number");
sysExcelCell= sysExcelCells.item(1,7);
sysExcelCell.value("Product name");
sysExcelCell= sysExcelCells.item(1,8);
sysExcelCell.value("Quantity");
sysExcelCell= sysExcelCells.item(1,9);
sysExcelCell.value("Unit Price");
sysExcelCell= sysExcelCells.item(1,10);
sysExcelCell.value("site");
sysExcelCell= sysExcelCells.item(1,11);
sysExcelCell.value("Warehouse");
sysExcelCell= sysExcelCells.item(1,12);
sysExcelCell.value("Delivery name");
sysExcelCell= sysExcelCells.item(1,13);
sysExcelCell.value("Delivery address");
row = 1;
select salesTable1 join salesLine1 join inventDim1 where salesTable1.SalesId == SalesTable_SalesId.valueStr()
&& salesLine1.SalesId == salesTable1.SalesId
&& inventDim1.inventDimId == salesLine1.InventDimId;
// && inventTable.ItemId == salesLine1.ItemId
{
progress.setCaption("Export To Excel in progress...");
progress.setAnimation(#AviUpdate);
progress.setText(strfmt("creating line for Item %1", row));
row++;
sysExcelCell = sysExcelCells.item(row , 1);
sysExcelCell.value(salesTable1.SalesId);
sysExcelCell = sysExcelCells.item(row,2);
sysExcelCell.value(salesTable1.CustAccount);
sysExcelCell = sysExcelCells.item(row , 3);
sysExcelCell.value(salesTable1.SalesName);
sysExcelCell = sysExcelCells.item(row , 4);
sysExcelCell.value(salesTable1.CustGroup);
sysExcelCell = sysExcelCells.item(row , 5);
sysexcelcell.value(salesTable1.CurrencyCode);
sysExcelCell = sysExcelCells.item(row , 6);
sysExcelCell.value(salesLine1.ItemId);
sysExcelCell = sysExcelCells.item(row , 7);
sysExcelCell.value(salesLine1.itemName());
sysExcelCell = sysExcelCells.item(row , 8);
sysExcelCell.value(salesLine1.SalesQty);
sysExcelCell = sysExcelCells.item(row , 9);
sysExcelCell.value(salesLine1.SalesPrice);
sysExcelCell = sysExcelCells.item(row , 10);
sysExcelCell.value(inventDim1.InventSiteId);
sysExcelCell = sysExcelCells.item(row , 11);
sysExcelCell.value(inventDim1.InventLocationId);
sysExcelCell = sysExcelCells.item(row , 12);
sysExcelCell.value(salesLine1.DeliveryName);
sysExcelCell = sysExcelCells.item(row , 13);
sysExcelCell.value(salesLine1.deliveryAddress().Address);
}
sysExcelApplication.visible(true);
super();
}
No comments:
Post a Comment