Report opened from menuitem based on conditions

Hi ,

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.

can anybody send the solution to task

Hello Rami Reddy,

On different menu item what you want to filter… All the menu items are of same type… Please specify wht you want from menu item…

Hi Varun,

I have a report with InventTable query and in Autodesign Itemnumber ,itemName and ABCValue fields.

for that report i made 3 menuitems .now what my task is when i open 1st menuitem it shows only records match with ABCValue ‘A’

2nd ‘B’ and 3 rd ‘C’ .for that where & how ,i write conditions for fetching .

can u send me the code.

One way is,

Change your MenuItem properties.

EnumTypeParameter - ABC

EnumParameter - A

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

Thanks Kranthi , for your solution. it is working perfectly.