This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - Custom Reports In Aras

walekarsa - Thursday, December 17, 2009 7:43 AM:

I want to create a Report for An Item Type "B Package."

Using a Report function in Administration folder I have created a custom report.  THis report gives me the list of items and two propeties package no and state. This report has been added to the item type B Package.

When I run the Report I am not getting the result. Instead I get a page which shows the first item in the item list. Say for instance the first item in the item list is DN00021 and its state Released. I get only this item and the corresponding state in the report window. I am not getting the entire list of Item.

The query written is as follows,

<Item action="get" type="B_Package" select="package_no,state"/>

In teh Stylesheet I have made changes as follows,

<table border="2" cellspacing="2" cellpadding="0" width="670" align="left" style="">
          <tr valign="top">
            <td style="font-family:Arial;font-size:14;text-align:Center;padding:2px;" align="left" colspan="" rowspan="" height="" width="">Package_No</td>
            <td>
              <xsl:value-of disable-output-escaping="yes" select="//Item[@type='B_Package']/package_no"></xsl:value-of>
            </td>
            <td style="font-family:Arial;font-size:14;text-align:Center;padding:2px;" align="left" colspan="" rowspan="" height="" width="">Current_State</td>
            <td>
              <xsl:value-of disable-output-escaping="yes" select="//Item[@type='B_Package']/state"></xsl:value-of>
            </td>
          </tr>
          <tr valign="top">
            <td>
              <xsl:value-of disable-output-escaping="yes" select="//Item[@type='B_Package']/package_no"></xsl:value-of>
            </td>
            <td>
              <xsl:value-of disable-output-escaping="yes" select="//Item[@type='B_Package']/state"></xsl:value-of>
            </td>
          </tr>
        </table>

Kindly help me in this regards,

Sandeep A. Walekar

 

 



RobMcAveney - Thursday, December 17, 2009 10:22 AM:

You have to use either xsl:template or xsl:for-each in order to get the repeating behavior.  Try replacing your table with something like this:

<table border="2" cellspacing="2" cellpadding="0" width="670" align="left" style="">
 <tr valign="top">
  <td style="font-family:Arial;font-size:14;text-align:Center;padding:2px;" align="left" colspan="" rowspan="" height="" width="">Package_No</td>
  <td style="font-family:Arial;font-size:14;text-align:Center;padding:2px;" align="left" colspan="" rowspan="" height="" width="">Current_State</td>
 </tr>
 <xsl:apply-templates select="//Item[@type='B_Package']"/>
</table>

and then create a new template later in the stylesheet that looks something like this:


<xsl:template match="Item[@type='B_Package']">
 <tr valign="top">
  <td>
   <xsl:value-of disable-output-escaping="yes" select="package_no"></xsl:value-of>
  </td>
  <td>
   <xsl:value-of disable-output-escaping="yes" select="state"></xsl:value-of>
  </td>
 </tr>
</xsl:template>

 



walekarsa - Tuesday, December 22, 2009 8:44 AM:

Hi Rob,

Thanks for your reply. I could ge the result.

I could also repeat it for the Project item type, to get the Project no, name and state.

However if I want to get the roll up percent complete of the project I am getting a blank column. I have written the following query.

<Item type="Project" action="get" select="project_number,name,state">
 <Relationship>
  <Item type="Activity2 Assignment" action="get" select="percent_compl"/>
</Relationship>
</Item>

I have tried all the relationships like the Project tree, WBS Element etc. but still could not get the status. What may be the issue.

 

Thanks in Advance,