Gemini Community Support Site

This Gemini community support site can be used to find solutions to product issues. You can log in using Open Id, Google Profile and even Facebook. Feel free to ask a question or browse FAQs and documentation. Product tour videos are also available along with how-to videos demonstrating key Gemini capabilities.




Custom Report Question

web-app

I am trying to tweak one of the xsl documents for a new report.  I basically don't want to show all of the custom fields in the report. 

I am thinking it should be possible to specifiy them by using a filter in the xsl, but I am pretty new to xsl.  What makes it even harder is I don't know how to see the raw xml that is being returned to the page that generates the report..

 I would like to see an example of the xml that the xsl file uses to create the reports.  This would make it easier to make the needed changes to the xsl.

afriedel
· 1
afriedel
Replies (4)
helpful
0
not helpful

All you need to do is comment / remove the custom fields lines in the IssuesExcel.xsl:

.....

  <xsl:for-each select="CustomFieldDefinitions">
   <td><xsl:value-of select="screenlabel"/></td>
  </xsl:for-each>
.....

.....

<xsl:for-each select="../CustomFieldData[issueid=$IID]">
   <td>&#160;<xsl:value-of select="fielddata"/></td>
  </xsl:for-each>


Saar Cohen
· 5000
Saar Cohen
helpful
0
not helpful

Sorry for the miscommunication.  When I said I don't want to see all of the custom fields, I meant that I want to see some of them, but not all of them.


afriedel
· 1
afriedel
helpful
0
not helpful

I have a workable solution that I though I might share.  I only want to see 3 of 7 fields.

Where the xsl outputs the data I created 3 variables to hold the ids of the fields I wanted to see.
<xsl:variable name="UserReportingIssue" select="../CustomFieldDefinitions[customfieldname='User reporting issue']/customfieldid"/>
        <xsl:variable name="Resource" select="../CustomFieldDefinitions[customfieldname='Resource']/customfieldid"/>
        <xsl:variable name="Department" select="../CustomFieldDefinitions[customfieldname='Department']/customfieldid"/>


Then below to see the data I do this.
<xsl:for-each select="../CustomFieldData[issueid=$IID and customfieldid=$UserReportingIssue]">
            <td><xsl:value-of select="fielddata"/></td>
        </xsl:for-each>
        <xsl:for-each select="../CustomFieldData[issueid=$IID and customfieldid=$Resource]">
            <td><xsl:value-of select="fielddata"/></td>
        </xsl:for-each>
        <xsl:for-each select="../CustomFieldData[issueid=$IID and customfieldid=$Department]">
            <td><xsl:value-of select="fielddata"/></td>
        </xsl:for-each>

I make no assertions that this is the best way to do it, but it works. 

I finally figured out that there are 3 sets of data in the xml.  IssueData, CustomFieldDefinitions and CustomFieldData.  Once I made that realization it was fairly easy to come up with the above code.


afriedel
· 1
afriedel
helpful
0
not helpful

Thanks!   This looks useful!   I'll try it, share w/ my internal folks.

Regards,

Yarko


yarkot
· 1
yarkot