i have a doubt on report i.e., i want to open the report from menuitem based on conditions.For that i create 3 menuitems for report when i open 1st menuitem it opens only values matches to the ABCValue enum value i.e, 'A ’ records,
2nd menuitem opens values matches with ABCValue ‘B’ records only and 3rd opens ‘C’ records inventTable.
The above properties are for Menu item which will open a report with “A” value. Change the properties of the other two menu items according to that(B,C).
Add this method to your report,
public void initFromCaller(Args _args)
{
QueryBuildDataSource qbds;
ABC parmEnum;
;
parmEnum = _args.parmEnum();///will return your EnumParameter value of the caller menu item
if (parmEnum)///If found
{
qbds = element.query().dataSourceTable(tablenum(InventTable));
/// add a range and value to that
sysquery::findOrCreateRange(qbds,fieldnum(InventTable,ABCValue)).value(QueryValue(parmEnum));
}
}