Stylesheet Query

When the Report type is set to Item, the Report Query is an XSLT style sheet. Use the stylesheet to transform AML for the selected item into a new AML query that you can use to query the data for the Report. The reason for creating the new query is that the item selected tends not to already include the item relationships, so you need to generate the actual query dynamically using the data known from the selected item.

For example, the following is an XSLT style sheet that transforms a Part item into a new AML query for a BOM Report. Notice that for the most part this is an AML query but because it’s an XSLT style sheet the Attribute value templates {…} can be used to substitute values inline from the selected item. The text within the curly brackets is evaluated as an expression, which in this case is simply returning the values for the type and id attributes from the selected item.

<Item

action="get”

type="{@type}"

id="{@id}"

select="item_number,description,cost">

<Relationships>

<Item

action="get”

type="Part BOM”

select="qty,ref_des,related_id(item_number,description,cost)"/>

</Relationships>

</Item>