DisplayTag
  1. DisplayTag
  2. DISPL-451

Sub Totals and Totals in Export - PDF and Excel

    Details

    • Type: Improvement Improvement
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.1
    • Fix Version/s: TBD
    • Component/s: Export
    • Labels:
      None

      Description

      I am trying to export the report to PDF. This report consits of sub totals and grand totals. which are displayed properly by grouping option on the JSP.
      But the same feature is not there in the PDF export.

      It would be good to have that feature because any real time applications/reports needs them in deed.

      Hope to see the feature in the tag library at the earliest.

      Cheers, Kranti

        Activity

        Hide
        Ritesh Shah added a comment -
        I am facing the same problem with the Excel Download.

        <display:table name="rsConsReport" class="its" id="currentRowObject" export="true" freezeHeader="true" style="height:35" decorator="com.displaytag.beans.DTConsignedSetsWrapper">
        <display:column property="<%=strName1 %>" title="<%=strLabel1%>" group="1"/>
        <display:column property="ID" title="Set Id" style="width:80px" />
        <display:column property="<%=strName2%>" title="<%=strLabel2%>" />
        <display:column property="COUNT" title="Sets" style="width:30" class="alignright" total="true" format="{0, number, 0}"/>
        </display:table>
        I have my own decorator named "DTConsignedSetsWrapper" which extends the TotalTableDecorator. While displaying in jsp it shows the subtotal and total properly but while export in excel its not exporting the subtotal and total in excel file.

        Kindly inform update this post if you find any solution.

        Thank
        Ritesh
        Show
        Ritesh Shah added a comment - I am facing the same problem with the Excel Download. <display:table name="rsConsReport" class="its" id="currentRowObject" export="true" freezeHeader="true" style="height:35" decorator="com.displaytag.beans.DTConsignedSetsWrapper"> <display:column property="<%=strName1 %>" title="<%=strLabel1%>" group="1"/> <display:column property="ID" title="Set Id" style="width:80px" /> <display:column property="<%=strName2%>" title="<%=strLabel2%>" /> <display:column property="COUNT" title="Sets" style="width:30" class="alignright" total="true" format="{0, number, 0}"/> </display:table> I have my own decorator named "DTConsignedSetsWrapper" which extends the TotalTableDecorator. While displaying in jsp it shows the subtotal and total properly but while export in excel its not exporting the subtotal and total in excel file. Kindly inform update this post if you find any solution. Thank Ritesh
        Hide
        Christian Anderson added a comment -
        I am running into the same issue with trying to export to Excel and CSV. I've tried using both the TotalTableDecorator and MultilevelTotalTableDecorator. The totals display fine in HTML display (jsp) but do not display in the export files (CSV or Excel).

        I've also tried setting the export.excel.decorator property to use the TotalTableDecorator and MultilevelTotalTableDecorator but that hasn't worked either.

        <display:setProperty name="export.excel.decorator" value="org.displaytag.decorator.MultilevelTotalTableDecorator" />

        Here is my code:
        <display:table name="listData" id="displayTable" uid="row" export=true class="dataTable" decorator="org.displaytag.decorator.MultilevelTotalTableDecorator" >
            <display:setProperty name="export.excel.decorator" value="org.displaytag.decorator.MultilevelTotalTableDecorator" />
            
            <display:column property="mop_type_cd" title="Type" sortable=true sortProperty="mop_type_cd" headerClass="sortable" group=1 />
            <display:column title="Reg ID" sortable=true sortProperty="registrant_num" headerClass="sortable">
                ${row.registrant_num}
            </display:column>
            <display:column title="Last Name" sortable=true sortProperty="last_name" headerClass="sortable">
              ${row.last_name}
            </display:column>
            <display:column title="First Name" sortable=true sortProperty="first_name" headerClass="sortable">
              ${row.first_name?}
            </display:column>
            <display:column value=1 title="Count" format="{0,number}" total=true style="text-align:right" />
            <display:column property="amount" title="Amount Paid" total=true style="text-align:right" decorator="com.gpj.gl.reporting.web.displaytag.decorators.CurrencyWrapper"/>
            <display:column property="refund" title="Amount Refunded" total=true style="text-align:right" decorator="com.gpj.gl.reporting.web.displaytag.decorators.CurrencyWrapper"/>
        </display:table>

        If anyone has a solution to this please update this post.

        Thank you,
        Christian
        Show
        Christian Anderson added a comment - I am running into the same issue with trying to export to Excel and CSV. I've tried using both the TotalTableDecorator and MultilevelTotalTableDecorator. The totals display fine in HTML display (jsp) but do not display in the export files (CSV or Excel). I've also tried setting the export.excel.decorator property to use the TotalTableDecorator and MultilevelTotalTableDecorator but that hasn't worked either. <display:setProperty name="export.excel.decorator" value="org.displaytag.decorator.MultilevelTotalTableDecorator" /> Here is my code: <display:table name="listData" id="displayTable" uid="row" export=true class="dataTable" decorator="org.displaytag.decorator.MultilevelTotalTableDecorator" >     <display:setProperty name="export.excel.decorator" value="org.displaytag.decorator.MultilevelTotalTableDecorator" />          <display:column property="mop_type_cd" title="Type" sortable=true sortProperty="mop_type_cd" headerClass="sortable" group=1 />     <display:column title="Reg ID" sortable=true sortProperty="registrant_num" headerClass="sortable">         ${row.registrant_num}     </display:column>     <display:column title="Last Name" sortable=true sortProperty="last_name" headerClass="sortable">       ${row.last_name}     </display:column>     <display:column title="First Name" sortable=true sortProperty="first_name" headerClass="sortable">       ${row.first_name?}     </display:column>     <display:column value=1 title="Count" format="{0,number}" total=true style="text-align:right" />     <display:column property="amount" title="Amount Paid" total=true style="text-align:right" decorator="com.gpj.gl.reporting.web.displaytag.decorators.CurrencyWrapper"/>     <display:column property="refund" title="Amount Refunded" total=true style="text-align:right" decorator="com.gpj.gl.reporting.web.displaytag.decorators.CurrencyWrapper"/> </display:table> If anyone has a solution to this please update this post. Thank you, Christian
        Hide
        andy pruitt added a comment -
        See FopExportView.java and ExcelHssfView.java.
        Show
        andy pruitt added a comment - See FopExportView.java and ExcelHssfView.java.
        Hide
        Thomas Champagne added a comment -
        Ok, I see your modifications in source repository : http://displaytag.svn.sourceforge.net/viewvc/displaytag?view=revision&revision=1166

        When do you think this patch will be integrated in a release version ? version 1.3 ?
        Show
        Thomas Champagne added a comment - Ok, I see your modifications in source repository : http://displaytag.svn.sourceforge.net/viewvc/displaytag?view=revision&revision=1166 When do you think this patch will be integrated in a release version ? version 1.3 ?

          People

          • Reporter:
            Kranti Parisa
          • Votes:
            4 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: