Issue Details (XML | Word | Printable)

Key: DISPL-451
Type: Improvement Improvement
Status: Open Open
Priority: Blocker Blocker
Reporter: Kranti Parisa
Votes: 3
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
DisplayTag

Sub Totals and Totals in Export - PDF and Excel

Created: 09/Mar/07 10:11 AM   Updated: 23/Jun/09 12:05 PM
Component/s: Export
Affects Version/s: 1.1
Fix Version/s: None

Time Tracking:
Not Specified


 Description  « Hide
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

Ritesh Shah added a comment - 20/May/09 03:46 PM
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

Christian Anderson added a comment - 23/Jun/09 12:05 PM
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