Learn More





Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsReportsReportsXSLT not formatting in ReportsXSLT not formatting in Reports
New Post
3/5/2015 1:44 PM

I am having a problem getting XSLT to work properly in the reports module when pulling data from a Form and List datasource.

DNN Site:  7.0.6
FNL module has two fields:   Account, Amount.

I built an XLS file for the FNL module and it works fine.  The intention is to subtotal all the Amounts for each Account.

However, with the limitation of 1 instance of FNL per page, there are different ways I want the data used so I put a a couple instances of the reports module on another page as well.  On that page, I reference the same XSLT file, but the output does not look the same.

 Within the FNL module I get:

Account 1              total
Account 2              total
Account 3              total  etc.

Within the Reports module, I get:

Account 1totalAccount 2totalAccount 3total

XSL file below.... any ideas????

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="" xmlns:udt="DotNetNuke/UserDefinedTable" exclude-result-prefixes="udt">
  <xsl:output method="xml" indent="yes" omit-xml-declaration="yes" />
  <xsl:key name="data-by-account" match="udt:Data" use="udt:Account" />
  <xsl:variable name="prefix_param">udt_<xsl:value-of select="//udt:Context/udt:ModuleId" />_param</xsl:variable>

  <xsl:template match="udt:Data" mode="list">
    <tr class="Normal">
        <xsl:value-of select="udt:Account" disable-output-escaping="yes" />
        <div class="row" style="text-align:right">
          <xsl:variable name="tAmount" select="udt:Account" />
          <xsl:value-of select="sum(//udt:Data[udt:Account=$tAmount]/udt:Amount)" disable-output-escaping="yes" />

  <xsl:template match="/udt:UserDefinedTable">
    <xsl:variable name="currentData" select="udt:Data[count(. | key('data-by-account', udt:Account)[1]) = 1]" />
    <xsl:if test="$currentData">
      <table width="100%">
          <th width="20%" align="left">Account</th>
          <th width="20%" align="right">Amount</th>
        <xsl:apply-templates select="$currentData" mode="list">
          <xsl:sort select="Account" data-type="number" order="ascending" />

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsReportsReportsXSLT not formatting in ReportsXSLT not formatting in Reports

These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
Try Evoq
For Free
Start Free Trial
a Demo
See Evoq Live
Need More Information?