java—有没有任何方法可以将汇总行中的总计导出到普通文件中?

5q4ezhmt  于 2021-06-29  发布在  Java
关注(0)|答案(1)|浏览(282)

我使用PrimeFaces8.0来显示一个包含部分结果的数据表。我是说,一天的总量。在视图中它可以工作,但是当我尝试导出它时,它不会显示任何总计。我一直在网上搜索,他们说要使用primefaces扩展,但对我也不起作用。
这是我的数据表

<p:dataTable id="Opcion1" value="#{llamadaBean.lista1}" var="lista1" rows="50"
                         paginator="true"
                         paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                         currentPageReportTemplate="{startRecord}-{endRecord} of {totalRecords} records"
                         sortBy="#{lista1.fecha}">
                <p:column headerText="FECHA">
                    <p:outputLabel value="#{lista1.fecha}"/>
                </p:column>
                <p:column headerText="HORA">
                    <p:outputLabel value="#{lista1.hora}"/>
                </p:column>
                <p:column headerText="TRANSACCIONES">
                    <p:outputLabel value="#{lista1.numTransacciones}"/>
                </p:column>
                <p:summaryRow>
                    <p:column colspan="2" style="text-align:right">
                        <h:outputText value="Total:" />
                    </p:column>
                    <p:column>
                        <h:outputText value="#{lista1.totalTransacciones}">                                        
                        </h:outputText>
                    </p:column>
                </p:summaryRow>
            </p:dataTable>


需要帮忙吗?

wlsrxk51

wlsrxk511#

当前无法导出pf或pfe中的摘要行。
您必须编写一个自定义导出程序。您可以在github上将其报告为增强票证请求。
请参见pf showcase上的textexporter示例:https://www.primefaces.org/showcase/ui/data/dataexporter/basic.xhtml

相关问题