[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.axapta.programming

Passing Parameters to MenuItems

babyto

2/1/2006 1:50:00 PM

How can i pass parameters(possible values from BaseEnumType) to MenuItems so
that later according to the value to activate different Report....Please help
2 Answers

Necmi Göcek

2/1/2006 4:32:00 PM

0

Example shows how can we run a report from job. You may want to add this code
under a button's clicked event or you can create different menuItems that
refers same report ( Like SalesPackingSlip report ) with appropritae
EnumTypeParameter ( PrintCopyOriginal in SalesPackingSlip report) and Enum
Values.

static void ReportRunFromJob(Args _args)
{
Args parameters = new Args();
MenuFunction salesPackingSlipMenuFunction;
CustPackingSlipJour cpsj;
;

select * from cpsj where cpsj.PackingSlipId == '0000001a36';

parameters.record(cpsj);
// Copy, Original, OriginalPrint
parameters.parmEnum(PrintCopyOriginal::OriginalPrint);

salesPackingSlipMenuFunction = new
MenuFunction(menuItemOutputStr(SalesPackingSlip),MenuItemType::Output);
salesPackingSlipMenuFunction.run(parameters);
}
--
_MIB_


"babyto" wrote:

> How can i pass parameters(possible values from BaseEnumType) to MenuItems so
> that later according to the value to activate different Report....Please help

PacMan

2/14/2006 5:08:00 AM

0

Thank you. You were a great help!

"Necmi Göcek" wrote:

> Example shows how can we run a report from job. You may want to add this code
> under a button's clicked event or you can create different menuItems that
> refers same report ( Like SalesPackingSlip report ) with appropritae
> EnumTypeParameter ( PrintCopyOriginal in SalesPackingSlip report) and Enum
> Values.
>
> static void ReportRunFromJob(Args _args)
> {
> Args parameters = new Args();
> MenuFunction salesPackingSlipMenuFunction;
> CustPackingSlipJour cpsj;
> ;
>
> select * from cpsj where cpsj.PackingSlipId == '0000001a36';
>
> parameters.record(cpsj);
> // Copy, Original, OriginalPrint
> parameters.parmEnum(PrintCopyOriginal::OriginalPrint);
>
> salesPackingSlipMenuFunction = new
> MenuFunction(menuItemOutputStr(SalesPackingSlip),MenuItemType::Output);
> salesPackingSlipMenuFunction.run(parameters);
> }
> --
> _MIB_
>
>
> "babyto" wrote:
>
> > How can i pass parameters(possible values from BaseEnumType) to MenuItems so
> > that later according to the value to activate different Report....Please help