- Code in button form Item.
- You create form name SCI_Print_Lable.
Example in Project SCI_PrintLabe.
void clicked()
{
/////// Use Call Form //////////
void PrintLabel(InventTable runInventTable){
Args args = new Args();
FormRun formRun;
;
args.name(formstr(SCI_Print_Label));
args.record(runInventTable);
//args.caller(this);
formRun = classfactory.formRunClass(args);
formRun.init();
formRun.run();
formRun.detach();
formRun.wait();
}
;
/////// Delet Data In Table. Befor insert new data. //////////
ttsbegin;
WHILE
SELECT FORUPDATE * FROM TableTmpPrintLabel
{
TableTmpPrintLabel.delete();
}
ttscommit;
/////// Loop check count seleted in line. //////////
for (myInventTable = InventTable_ds.getFirst(true) ? InventTable_ds.getFirst(true) :InventTable_ds.cursor();
myInventTable; myInventTable = InventTable_ds.getnext()){
x++;
}
if (x > 1){
i = x;
/////// Loop check count for open form. //////////
for (myInventTable = InventTable_ds.getFirst(true) ? InventTable_ds.getFirst(true) :InventTable_ds.cursor();
myInventTable; myInventTable = InventTable_ds.getnext()){
PrintLabel(myInventTable);
}
// super();
}
No comments:
Post a Comment