Different menuitems in click()

Hi guys,

I hav to open different reports form the same menuItem on some conditions, for that i override the click method of menuitem

as

if(Condition1)

new menuFunction(menuItemOutputStr(Menuitem1),MenuItemType::Output);

If(Condition2)

new menuFunction(menuItemOutputStr(Menuitem2),MenuItemType::Output);

But this is not opening my report…Can anybody help me on this

Thanks in advance

It takes the menu Item specified in the property.

Set the auto declaration property to yes and change the menuItemName property dynamically in the clicked method before a call to super();

something like this

if(Condition1)

MenuItemButton.menuItemName(menuItemOutputStr(Menuitem1));// MenuItemButton is the name of menuItemButton

If(Condition2)

MenuItemButton.menuItemName(menuItemOutputStr(Menuitem2));

Hi Joythi,

For you reference you can see the functionality of the sales invoice report. see the methods in CustInvoiceJour Form->Designs->buttonGroup->OriginalPreview->clicked method

and tables->custinvoicejour->printjournal method …

I hope this would help you…