Hi all,
I’m new on Axapta.
Have you any idea about to start different Reports from a single Menu item: I need this because I would like to open different custom reports (ie SalesInvoice) based on Company.
Thanks for help
Hi all,
I’m new on Axapta.
Have you any idea about to start different Reports from a single Menu item: I need this because I would like to open different custom reports (ie SalesInvoice) based on Company.
Thanks for help
you can simple assign the menu item to a class instead of a report. and in the class, depending on whatever you want, open different reports.
Hi Vanya,
thank you for your answer.I check your solution and I work on reportRunClass method of ClassFactory class.In the following code you find my solution.
ReportRun reportRunClass(Args args)
{
#AOT
str reportName = args.name();
str reportNameNew;
Report tmpReport;
TreeNode reportNode = TreeNode::findNode(#ReportsPath);
;
// if a report called exists run it
// otherwise run the standard one
reportNameNew = curext() +’’ + reportName;
tmpReport = reportNode.AOTfindChild(reportNameNew);
if (tmpReport)
{
args.name(reportNameNew);
}
return new sysReportRun(args);
}
Please let me know if in your knowledge this is ok.
Thank you again!
Well, actually I was thinking there are only a couple of reports like that, and was intending for a more “local” solution, with a separate class launching reports, but I guess this is Ok and should work as well.
And if you have a lot of reports that have to be Company_based, than it’s the perfect way to do it, I guess.
Minimum changes
Thank you very much!