public class ReportRun extends ObjectRun
{
ItemGroupId itemGroup;
DialogField dialogItemGroup;
}
public Object dialog(Object _dialog)
{
DialogRunBase dialog;
;
dialog = super(_dialog);
dialog.caption("Inventory");
dialog.addGroup("Item Group");
dialogItemGroup = dialog.addFieldValue(typeid(ItemGroupId),itemGroup,"Item Group");
return dialog;
}
public boolean getFromDialog()
{
;
itemGroup = dialogItemGroup.value();
return true;
}
public boolean fetch()
{
Query q;
QueryRun qr;
QueryBuildDataSource qbds;
QueryBuildRange qbr;
;
q = new Query(this);
qbds = q.dataSourceTable(tablenum(InventTable));
qbr = qbds.addRange(fieldnum(InventTable,ItemGroupId));
qbr.value(itemgroup);
qr = new QueryRun(q);
while( qr.next() )
{
inventTable = qr.get(tablenum(InventTable));
this.send(inventTable);
}
return true;
}
Note: for reference you can check LedgerCheckTrans report
Thanks for sharing...
ReplyDeleteQuickbooks intuit software