Hi Kamran,
Here is the general approach I'd recommend:
- Create a server-side method in Aras that does the following:
- Accepts a report name or id and an item id as parameters
- Retrieves the report item's stylesheet and report query properties
- Replaces the {@id} placeholder in the report query string
- Loads the report query AML into an Item and apply it to the server, or use applyAML()
- Performs an XSL transform on the response from step D using the report's stylesheet
- Returns the HTML string resulting from the XSL transformation
- Call that server-side method via the REST API, passing in the name/id of the report and the id of the context item you want to run the report on.
- Parse the HTML out of the resulting JSON response from your REST call.
- Display the HTML however you want in your client.
Alternatively, you could perform steps 1e and 1f in your client application if you prefer.
Hope this helps!
Eli
Eli Donahue
Technical Product Manager