Hi ,
Thanks for the help, iam able to display report on click of the button.
i need one help what's happening is even if there is error in the form the
report is getting displayed , is there any method where we can check for
error condition and then display the report if there is no error,
right now error message is getting deisplayed after the report is displayed.
Thanks in advance
rr
"JFB the Smoggy" wrote:
> Raj,
>
> Check out the helptext for MenuFunction from the AOT \System documentation
> \Classes:
>
> ==========
> A MenuFunction object represents an interface to other Axapta Application
> objects. It provides an easy way to access and run any Form, Report, Job,
> Class and Query.
>
> Example
> This example uses a MenuFunction object to access and run a Tax Report:
> {
> MenuFunction mf;
> ReportRun Report;
> Args A = new Args();
>
> // Create a MenuFunction object
> mf = new MenuFunction(ReportStr(TaxReporting), MenuItemType::Output);
>
> //Setup arguments to pass to the report.
> A.caller(this);
> A.record(TaxReportVoucher);
> Report = mf.create(A);
> Report.run();
> }
> ==========
>
> To make this happen when clicking a button, override the clicked() method on
> the form button control.
>
> ....or use the ClassFactory to instantiate an object inheriting from
> RunbaseReport()....
>
> JFB Smoggy
> ----
>
> "Raj" <Raj@discussions.microsoft.com> wrote in message
> news:254BE7D2-FAC4-4EA8-B192-AAC665F98144@microsoft.com...
> > Hi ,
> > I want to send the report to the printer on click of a button from
> > a
> > Form ,
> > My problem is how to pass the Values of the selected record in the form as
> > parameter to the report , so that the report displays records pertaining
> > only
> > to the selected record in the grid.
> >
> > Do any one have Code to do this. I want to do this process using code.
> >
> > Raj
>
>
>