how to open report using code?

hi,

how to open report using code?

Ex: I have a button on form,through button i want to open report?

static void RunReportByCodeB()

{ Object reportRun;

Args args = new Args(reportstr(‘Cust’));

;

reportRun = new Reportrun(args);

reportRun.init();

reportRun.run();

}

HI,

First create a new menu button which is the type output in the aot and add your report in the menu button properties.

After that go to your form ->designs and add the menu button.

HI,

in that code u come to end and write this code

args args; //declare args

;

args = new Args();
args.caller(element);
new MenuFunction(menuitemoutputstr(Myreport), MenuItemType::Output).run(args);

Hi Balu,

void clicked()

{

;

super();

new menufunction(menuitemoutputstr(YourReport), MenuItemType::Output).run();

}

Thanks & Regards,

Britto John Baskar.A

Still not clear !!

How to open report created in the SSRS and deployed to the report Server from the Ax and through Paramerers from the current record