Output material of component?

Greetings all. I have a NX program that generates a Flat BOM of the assembly along with a few other details for each component. How can I output the material of each component? If material is only assigned to bodies, is there a way to get the material of each body within a component?

Any help would be appreciated.

Thanks

What version of NX are you using? If you are using NX 8 or later, there is a part attribute named "Material" that is automatically populated when a material is assigned to a body in the part. When you add a part as a component to an assembly, the component inherits the part attributes. You should be able to check the component for the "Material" attribute.