|
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 |
||||||||||||||||||||||||||||||||||
<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