Nathan_H_
4 years agoIdeator I
Run Aras Report from Method
Good day all,
How do I run an Aras report from a Method? I have several reports that I have created in Aras (not MS Report Services) and I can't figure out how to run one from a method. I'm tryin...
- 4 years ago
Hi Nathan,
I found this masterpiece in my valuable collection of fine arts that I have built up over the years:
var qry = new Item('Part','get');
qry.setID('DEAE331032E2495DA9C9BBB6CA4583EE'); //Id of the context item
var reportQry = new Item('Report','get');
reportQry.setID('FB8CA61BE45E46DE9E4346BB653398C2'); //Id of the Report -> Multilevel_BOM
var report = reportQry.apply();
aras.runReport(report.node, '', qry.node);
The code is from 2017, so maybe it requires some update to current codestyle.
But you can also look at the Aras-Methods that trigger Report items, e.g. Method 'cui_ivicb_reports_click' . This Method shows a more flexible variant, that can also call Self-Service-Reports.