Forum Discussion
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_BOMvar 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.
Angela,
Thanks for this info. I was able to get this report to run with what I am trying to do. Now I need to get the report I want to run to work.
Edit - I know, only a couple of minutes later, but... I was able to get this to work the way I wanted by removing the var qry & qry.setID lines and changing the qry.node to ''. Thanks again for your awesome help!
var reportQry = new Item('Report','get');
reportQry.setID('9812FBDFDDD64EF5B0799CCE7A55B73E'); //Id of the Report -> My Custom Report
var report = reportQry.apply();
aras.runReport(report.node, '', '');