- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我正在使用动态报告库创建 Jasper 报告。我正在尝试编译动态报告,以便稍后使用编译版本。但是我的报告的编译版本没有反射(reflect)动态报告所做的更改
这是我的代码:
JasperReportBuilder report = report();
report.setTemplateDesign(new File("Template.jrxml"));
report.setParameters(parameters);
List<TextColumnBuilder> lsColumns = getDRColumnsFromRecordset(rs);
for (TextColumnBuilder tcbColumn : lsColumns) {
report.addColumn(tcbColumn);
}
report.ignorePageWidth();
report.ignorePagination();
report.setDataSource(rs);
report.toXlsx();
//At the end, i compile the dynamic report
File compiledTemplate = new File("CompiledTemplate.jasper");
JasperCompileManager.compileReportToFile(report.toJasperDesign(), compiledTemplate.getPath());
在上面的代码中,它生成正确(当我运行 .toXlsx()
时)
但是,在应用程序的另一点,我检查编译的模板是否存在。如果存在,我将使用编译后的模板生成报告。
但是,当我尝试使用编译版本生成模板时,它返回空。
它是在没有记录集列的情况下生成的——我在上面的代码中动态添加了谁。
更新状态
2016 年 8 月 31 日
我的情况是:我有一个包含动态输出的过程(取决于您收到的参数)。因此,例如,当过程接收到 @Cod = 1 参数时,它将具有特定的 SQL 输出。我希望您第一次运行动态报告时,根据过程输出生成编译报告 (.jasper)。在随后的时间里,我可以重用已编译的报告 (.jasper),仅使用它来生成新报告。
我解决了部分问题。第二次运行时,jrxml 模板中没有 SQL。因此,我在该模板 jrxml 中插入了以下代码:
<parameter name="QUERY" class="java.lang.String" isForPrompting="false"/>
<queryString>
<![CDATA[$P!{QUERY}]]>
</queryString>
并且我在我的程序中插入了以下代码(使用在 DynamicReports 中生成的 .jasper 时):
JasperReport jasperReport = (JasperReport) JRLoader.loadObject(compiledTemplate);
parameters.put("QUERY", "dbo.pr_test_procedure @Cod=" + parameters.get("COD"));
JasperPrint jasperPrint
= JasperFillManager.fillReport(jasperReport,
parameters,
conn);
现在,报告会带来查询结果(如动态报告中的特色)。现在,问题是另一个:它不显示列标题。只显示记录。当我通过动态报告生成时,显示两者。使用编译的jasper生成时,只显示记录。
我现在的结果:这是 Dynamic Reports 中的报告(未编译):https://s21.postimg.org/arh0w5isn/relatorio_1.jpg这是编译后的报告,在Jasper https://s17.postimg.org/iozct8mwf/relatorio_2.jpg中生成
这是编译文件的jrxml:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.1.1.final using JasperReports Library version 6.1.1 -->
<!-- 2016-08-31T14:20:33 -->
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="Template_Basico" pageWidth="1392" pageHeight="595" orientation="Landscape" whenNoDataType="AllSectionsNoDetail" columnWidth="1352" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" isIgnorePagination="true" uuid="8a465670-cc4a-4270-965f-8efb86e33b71">
<property name="template.engine" value="tabular_template"/>
<property name="net.sf.jasperreports.export.xls.detect.cell.type" value="true"/>
<property name="net.sf.jasperreports.export.xls.show.gridlines" value="false"/>
<template><![CDATA[$P{PATH_PADRAODSM} + "/" + "Template_Basico.jrtx"]]></template>
<style name="TabelaCabecalho" mode="Opaque" backcolor="#4692F0" scaleImage="FillFrame" isBlankWhenNull="true" fontName="SansSerif" fontSize="13" isBold="true">
<pen lineStyle="Solid" lineColor="#000000"/>
<box>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
</style>
<style name="style_36_" forecolor="#000000" isBlankWhenNull="true" fontName="SansSerif" fontSize="10">
<box topPadding="2" leftPadding="2" bottomPadding="2" rightPadding="2"/>
</style>
<style name="Fonte" pattern="" isBlankWhenNull="true" fontName="Verdana" fontSize="11" isBold="false"/>
<subDataset name="tableDataset" uuid="73560e0d-a48c-4cef-a6c7-dc2799080847">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
<queryString>
<![CDATA[]]>
</queryString>
</subDataset>
<scriptlet name="DYNAMICREPORTS" class="net.sf.dynamicreports.jasper.base.JasperScriptlet"/>
<parameter name="CODPEDIDO" class="java.lang.Integer">
<parameterDescription><![CDATA[Código do pedido do relatório]]></parameterDescription>
<defaultValueExpression><![CDATA[90200]]></defaultValueExpression>
</parameter>
<parameter name="PATH" class="java.lang.String" isForPrompting="false">
<parameterDescription><![CDATA[]]></parameterDescription>
<defaultValueExpression><![CDATA["/home/diego.queres/Desenv/Relatórios Clientes/PadraoDSM_Templates"]]></defaultValueExpression>
</parameter>
<parameter name="TITULO" class="java.lang.String">
<defaultValueExpression><![CDATA["Relatório"]]></defaultValueExpression>
</parameter>
<parameter name="LOGOTIPO_1" class="java.lang.String" isForPrompting="false">
<parameterDescription><![CDATA[]]></parameterDescription>
<defaultValueExpression><![CDATA["logo-vagas.png"]]></defaultValueExpression>
</parameter>
<parameter name="PATH_PADRAODSM" class="java.lang.String">
<defaultValueExpression><![CDATA["/home/diego.queres/Desenv/Relatórios Clientes/PadraoDSM_Templates"]]></defaultValueExpression>
</parameter>
<parameter name="QUERY" class="java.lang.String" isForPrompting="false"/>
<parameter name="CUSTOM_VALUES" class="net.sf.dynamicreports.jasper.base.JasperCustomValues"/>
<queryString>
<![CDATA[$P!{QUERY}]]>
</queryString>
<field name="Codigo do candidato" class="java.lang.Integer">
<fieldDescription><![CDATA[Codigo do candidato]]></fieldDescription>
</field>
<field name="Nome" class="java.lang.String">
<fieldDescription><![CDATA[Nome]]></fieldDescription>
</field>
<field name="E-mail" class="java.lang.String">
<fieldDescription><![CDATA[E-mail]]></fieldDescription>
</field>
<field name="Idade" class="java.lang.Integer">
<fieldDescription><![CDATA[Idade]]></fieldDescription>
</field>
<field name="Telefone(s) Contato" class="java.lang.String">
<fieldDescription><![CDATA[Telefone(s) Contato]]></fieldDescription>
</field>
<field name="Cidade e Estado" class="java.lang.String">
<fieldDescription><![CDATA[Cidade e Estado]]></fieldDescription>
</field>
<field name="Tipo de Formação 1" class="java.lang.String">
<fieldDescription><![CDATA[Tipo de Formação 1]]></fieldDescription>
</field>
<field name="Formação 1" class="java.lang.String">
<fieldDescription><![CDATA[Formação 1]]></fieldDescription>
</field>
<field name="Instituição 1" class="java.lang.String">
<fieldDescription><![CDATA[Instituição 1]]></fieldDescription>
</field>
<field name="Tipo de Formação 2" class="java.lang.String">
<fieldDescription><![CDATA[Tipo de Formação 2]]></fieldDescription>
</field>
<field name="Formação 2" class="java.lang.String">
<fieldDescription><![CDATA[Formação 2]]></fieldDescription>
</field>
<field name="Instituição 2" class="java.lang.String">
<fieldDescription><![CDATA[Instituição 2]]></fieldDescription>
</field>
<field name="Histórico profissional (2 últimas empresas)" class="java.lang.String">
<fieldDescription><![CDATA[Histórico profissional (2 últimas empresas)]]></fieldDescription>
</field>
<title>
<band height="76" splitType="Stretch">
<image scaleImage="RetainShape">
<reportElement x="22" y="32" width="100" height="40" uuid="6047dd6f-0536-4689-bafa-083c4dad3a84"/>
<imageExpression><![CDATA[$P{PATH_PADRAODSM} + "/" + $P{LOGOTIPO_1}]]></imageExpression>
</image>
<textField>
<reportElement x="140" y="40" width="800" height="25" uuid="0282ba00-7352-4d77-bb8b-c0bb0ba0e585"/>
<textElement verticalAlignment="Bottom">
<font size="16"/>
</textElement>
<textFieldExpression><![CDATA[$P{TITULO}]]></textFieldExpression>
</textField>
</band>
</title>
<pageHeader>
<band height="36">
<line>
<reportElement mode="Transparent" x="0" y="12" width="100" height="1" forecolor="#FFFFFF" uuid="99aed6f5-8941-4876-a95c-1ee23bd1dc0a">
<propertyExpression name="net.sf.jasperreports.export.xls.sheet.name"><![CDATA["Dados"]]></propertyExpression>
</reportElement>
</line>
</band>
</pageHeader>
<columnHeader>
<band height="16">
<frame>
<reportElement key="columnHeader.list1" positionType="Float" x="0" y="0" width="1352" height="16" uuid="46d7f64e-9ba3-4fa3-b6f4-f4cde887a658"/>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement key="columnHeader.column_Codigo do candidato.title1" style="TabelaCabecalho" positionType="Float" stretchType="RelativeToTallestObject" x="0" y="0" width="104" height="16" uuid="4e458915-229a-4de2-8cdc-ca86d9721252"/>
<textFieldExpression><![CDATA[$P{CUSTOM_VALUES}.getValue("simpleExpression_10_")]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement key="columnHeader.column_Nome.title1" style="TabelaCabecalho" positionType="Float" stretchType="RelativeToTallestObject" x="104" y="0" width="104" height="16" uuid="95caf451-7a8b-41a6-a942-21cb7e3e6110"/>
<textFieldExpression><![CDATA[$P{CUSTOM_VALUES}.getValue("simpleExpression_12_")]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement key="columnHeader.column_E-mail.title1" style="TabelaCabecalho" positionType="Float" stretchType="RelativeToTallestObject" x="208" y="0" width="104" height="16" uuid="f1b3ad3f-c55d-478d-b4b5-9c73fb414477"/>
<textFieldExpression><![CDATA[$P{CUSTOM_VALUES}.getValue("simpleExpression_14_")]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement key="columnHeader.column_Idade.title1" style="TabelaCabecalho" positionType="Float" stretchType="RelativeToTallestObject" x="312" y="0" width="104" height="16" uuid="df361b4f-cad3-4770-b75c-38bfe3f1c281"/>
<textFieldExpression><![CDATA[$P{CUSTOM_VALUES}.getValue("simpleExpression_16_")]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement key="columnHeader.column_Telefone(s) Contato.title1" style="TabelaCabecalho" positionType="Float" stretchType="RelativeToTallestObject" x="416" y="0" width="104" height="16" uuid="4dc88b66-dcd6-4626-a788-7da1f70f7f6b"/>
<textFieldExpression><![CDATA[$P{CUSTOM_VALUES}.getValue("simpleExpression_18_")]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement key="columnHeader.column_Cidade e Estado.title1" style="TabelaCabecalho" positionType="Float" stretchType="RelativeToTallestObject" x="520" y="0" width="104" height="16" uuid="011ca35b-fe81-484e-aa1b-d383053452df"/>
<textFieldExpression><![CDATA[$P{CUSTOM_VALUES}.getValue("simpleExpression_20_")]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement key="columnHeader.column_Tipo de Formação 1.title1" style="TabelaCabecalho" positionType="Float" stretchType="RelativeToTallestObject" x="624" y="0" width="104" height="16" uuid="1e31895e-9fcf-4bb0-8e40-bd419c0af763"/>
<textFieldExpression><![CDATA[$P{CUSTOM_VALUES}.getValue("simpleExpression_22_")]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement key="columnHeader.column_Formação 1.title1" style="TabelaCabecalho" positionType="Float" stretchType="RelativeToTallestObject" x="728" y="0" width="104" height="16" uuid="86ed4ae1-7600-4df3-966f-401f1967e93b"/>
<textFieldExpression><![CDATA[$P{CUSTOM_VALUES}.getValue("simpleExpression_24_")]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement key="columnHeader.column_Instituição 1.title1" style="TabelaCabecalho" positionType="Float" stretchType="RelativeToTallestObject" x="832" y="0" width="104" height="16" uuid="1ce1e9dc-816a-410f-b4f0-71550c59ceeb"/>
<textFieldExpression><![CDATA[$P{CUSTOM_VALUES}.getValue("simpleExpression_26_")]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement key="columnHeader.column_Tipo de Formação 2.title1" style="TabelaCabecalho" positionType="Float" stretchType="RelativeToTallestObject" x="936" y="0" width="104" height="16" uuid="e589cd82-0758-468a-92e8-dc1a81f793ba"/>
<textFieldExpression><![CDATA[$P{CUSTOM_VALUES}.getValue("simpleExpression_28_")]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement key="columnHeader.column_Formação 2.title1" style="TabelaCabecalho" positionType="Float" stretchType="RelativeToTallestObject" x="1040" y="0" width="104" height="16" uuid="e719543b-a0e6-4f36-b265-82b0f6dbb11e"/>
<textFieldExpression><![CDATA[$P{CUSTOM_VALUES}.getValue("simpleExpression_30_")]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement key="columnHeader.column_Instituição 2.title1" style="TabelaCabecalho" positionType="Float" stretchType="RelativeToTallestObject" x="1144" y="0" width="104" height="16" uuid="d06d26bc-71a4-4444-b061-4e05bb1b7168"/>
<textFieldExpression><![CDATA[$P{CUSTOM_VALUES}.getValue("simpleExpression_32_")]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement key="columnHeader.column_Histórico profissional (2 últimas empresas).title1" style="TabelaCabecalho" positionType="Float" stretchType="RelativeToTallestObject" x="1248" y="0" width="104" height="16" uuid="0cd532cc-f4fb-47e9-aeff-cc1c61bd8a6c"/>
<textFieldExpression><![CDATA[$P{CUSTOM_VALUES}.getValue("simpleExpression_34_")]]></textFieldExpression>
</textField>
</frame>
</band>
</columnHeader>
<detail>
<band height="16">
<frame>
<reportElement key="detail.list1" positionType="Float" x="0" y="0" width="1352" height="16" uuid="6d7ecd54-a04a-477e-9848-3247fb8ef789"/>
<textField isStretchWithOverflow="true" pattern="#,##0" isBlankWhenNull="true">
<reportElement key="detail.column_Codigo do candidato1" style="style_36_" positionType="Float" stretchType="RelativeToTallestObject" x="0" y="0" width="104" height="16" isPrintInFirstWholeBand="true" uuid="640caec8-b919-41e2-aa57-93db114b9aec"/>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[$F{Codigo do candidato}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement key="detail.column_Nome1" style="style_36_" positionType="Float" stretchType="RelativeToTallestObject" x="104" y="0" width="104" height="16" isPrintInFirstWholeBand="true" uuid="78c8ddc7-82c5-4b8e-8ae2-a0c6be535dc7"/>
<textElement textAlignment="Left"/>
<textFieldExpression><![CDATA[$F{Nome}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement key="detail.column_E-mail1" style="style_36_" positionType="Float" stretchType="RelativeToTallestObject" x="208" y="0" width="104" height="16" isPrintInFirstWholeBand="true" uuid="c687dc47-b312-45d1-8f8f-af0952d2e0ad"/>
<textElement textAlignment="Left"/>
<textFieldExpression><![CDATA[$F{E-mail}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="#,##0" isBlankWhenNull="true">
<reportElement key="detail.column_Idade1" style="style_36_" positionType="Float" stretchType="RelativeToTallestObject" x="312" y="0" width="104" height="16" isPrintInFirstWholeBand="true" uuid="74fe0b04-c84b-4a82-96e8-1fa83acf5989"/>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA[$F{Idade}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement key="detail.column_Telefone(s) Contato1" style="style_36_" positionType="Float" stretchType="RelativeToTallestObject" x="416" y="0" width="104" height="16" isPrintInFirstWholeBand="true" uuid="f25f3fbd-3d07-4865-9ba0-9196281a3536"/>
<textElement textAlignment="Left"/>
<textFieldExpression><![CDATA[$F{Telefone(s) Contato}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement key="detail.column_Cidade e Estado1" style="style_36_" positionType="Float" stretchType="RelativeToTallestObject" x="520" y="0" width="104" height="16" isPrintInFirstWholeBand="true" uuid="2bef953f-ea52-4750-af77-0a8bc3efc3a0"/>
<textElement textAlignment="Left"/>
<textFieldExpression><![CDATA[$F{Cidade e Estado}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement key="detail.column_Tipo de Formação 11" style="style_36_" positionType="Float" stretchType="RelativeToTallestObject" x="624" y="0" width="104" height="16" isPrintInFirstWholeBand="true" uuid="a614443a-b729-4037-943c-d16f3ba8d1e9"/>
<textElement textAlignment="Left"/>
<textFieldExpression><![CDATA[$F{Tipo de Formação 1}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement key="detail.column_Formação 11" style="style_36_" positionType="Float" stretchType="RelativeToTallestObject" x="728" y="0" width="104" height="16" isPrintInFirstWholeBand="true" uuid="ac8d1676-a360-439f-925d-262df7f356e2"/>
<textElement textAlignment="Left"/>
<textFieldExpression><![CDATA[$F{Formação 1}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement key="detail.column_Instituição 11" style="style_36_" positionType="Float" stretchType="RelativeToTallestObject" x="832" y="0" width="104" height="16" isPrintInFirstWholeBand="true" uuid="e35aeb7c-a96d-41d3-a1c0-1c707c890d19"/>
<textElement textAlignment="Left"/>
<textFieldExpression><![CDATA[$F{Instituição 1}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement key="detail.column_Tipo de Formação 21" style="style_36_" positionType="Float" stretchType="RelativeToTallestObject" x="936" y="0" width="104" height="16" isPrintInFirstWholeBand="true" uuid="e8421e2e-5aa8-4ef5-b304-f49f708cc7df"/>
<textElement textAlignment="Left"/>
<textFieldExpression><![CDATA[$F{Tipo de Formação 2}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement key="detail.column_Formação 21" style="style_36_" positionType="Float" stretchType="RelativeToTallestObject" x="1040" y="0" width="104" height="16" isPrintInFirstWholeBand="true" uuid="c43405f4-08ef-484a-aa7b-de76c850bd48"/>
<textElement textAlignment="Left"/>
<textFieldExpression><![CDATA[$F{Formação 2}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement key="detail.column_Instituição 21" style="style_36_" positionType="Float" stretchType="RelativeToTallestObject" x="1144" y="0" width="104" height="16" isPrintInFirstWholeBand="true" uuid="3f1903a0-30a2-430b-bd57-7c8ce1211a82"/>
<textElement textAlignment="Left"/>
<textFieldExpression><![CDATA[$F{Instituição 2}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement key="detail.column_Histórico profissional (2 últimas empresas)1" style="style_36_" positionType="Float" stretchType="RelativeToTallestObject" x="1248" y="0" width="104" height="16" isPrintInFirstWholeBand="true" uuid="f07d5d11-9422-4c35-b8f5-3904982ca456"/>
<textElement textAlignment="Left"/>
<textFieldExpression><![CDATA[$F{Histórico profissional (2 últimas empresas)}]]></textFieldExpression>
</textField>
</frame>
</band>
</detail>
<pageFooter>
<band height="38" splitType="Stretch"/>
</pageFooter>
<summary>
<band height="46" splitType="Stretch">
<property name="local_mesure_unitheight" value="pixel"/>
<textField pattern="">
<reportElement x="0" y="34" width="560" height="12" uuid="4ca54330-fb17-4ef6-8d18-3ceace2083b9"/>
<textElement textAlignment="Left"/>
<textFieldExpression><![CDATA["Relatório gerado por VAGAS Tecnologia de Software em " + new SimpleDateFormat("dd/MM/yy HH:mm:ss").format(new java.util.Date())]]></textFieldExpression>
</textField>
</band>
</summary>
</jasperReport>
最佳答案
您正在保存未填充的报告的编译版本,JasperDesign
对象不是 JasperPrint
你应该使用report.toJasperPrint()
示例
JRSaver.saveObject(report.toJasperPrint(), "fullPath/yourReport.jrprint");
要重新加载您填写的报告,请使用:
JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(new java.io.FileInputStream("fullPath/yourReport.jrprint"));
要导出,请使用 JasperExportManager
或导出类示例之一 JRXlsExporter
关于java - 为什么已编译的动态报告 (.jasper) 没有反射(reflect)更改?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39212514/
我有一个在旧版 iReport 3.0 中构建的 JRXML 报告,现在我想将其更新到较新的 iReport 4.7。 这样做的步骤是什么,请解释一下? 最佳答案 您可以使用位于 jasperserv
我的问题是,即使该行是空白的,它仍然占据了 band 高度的空间,因此在下一个 band 之前有比平时更大的间隙。 我的 jasper 文件中的乐队看起来像这样:
我在使用 Eclipse JasperReports Studio 时遇到了一个我无法解决的问题。我有一个非常基本的报告,其中包含返回大约 30 行的详细信息字段。我有一个要合并到主报告中的子报告,但
我有一个包含许多列但只有几行的交叉表。当我生成报告时,交叉表会重用一页中行下方的空白空间,并为相同的行呈现下一列。这样,几页被垂直压缩在一页上: 我想要第 天的列20 到天 27 (交叉表的第二部分)
我们正在使用 jaspersoft studio 创建报告,但我被困在查询部分。 从逻辑上讲,我想要的查询类型是: select * from mytable where
我想在 ireport 中创建多个组,并且数据应该以分组方式显示。例如: 首先应该完全打印 Group1 数据,然后, 第一组: 模块数据 在此之后我想完全打印 Group2 数据 组2: 类别数据
我有一个 Jasper 报告,它有一个详细信息部分,在详细信息部分内有一个来自数据库的打印字段。因此,如果我的查询返回 100 行,我会得到 100 行,这会生成一个大约 10 页长的报告,因为 10
我正在使用 Jasper 报告。我有一个页眉、详细信息和摘要带。页眉在所有页面上重复,但有时只有摘要部分移到最后一页,因为详细信息在此之前的页面中结束。标题不打印在最后一页,即摘要页。 有人知道为什么
这个问题在这里已经有了答案: How to pass ArrayList to JasperReports? (3 个回答) 上个月关闭。 如何创建将在详细信息部分迭代 arraylist 的报告,该
我有一个包含两个框架的 columnHeader 带。 如果参数为 TRUE,则第一帧必须可见,如果参数为 FALSE,则第二帧必须可见。 所以我只想显示一帧。 我按顺序放置了两帧。可见性还可以,但是
我在 jasper 报告中有一个表格,我需要该表格中某些单元格的内容垂直对齐。 我正在尝试使用 iReport 编辑报告。 在 iReport 中,我可以进入单元格的属性并看到垂直对齐设置为“中间”。
我正在尝试生成包含表格的报告。这些是 jrxml 的重要部分:
我想为文本字段绘制一个虚线底部边框,以多行显示其内容。 例如: Address: 104th Street, - - - - - - - - - - -- - - - - - - -
我在 Maven 中使用 Jasper Reports 5.2.0 和 Spring MVC。 我已经使用 JasperViewer 完成了报告,但突然出现了无法解决的错误: net.sf.jaspe
我想将图像嵌入到我的JasperReports jrxml文件中。我有这个目录结构。 Tomcat Root webapps reports -->images --> compa
我有三个不同的查询,并希望根据 jasper 报告中获取的值运行它们。查询是在 Jrxml 文件本身中编写的。如何根据不同的动态值运行不同的查询。 喜欢(这只是一个 sudo 代码) If($(a)
以下是一些演示问题的屏幕截图:首先,这是没有列表元素的设计: 这是该报告的结果(注意有两页): 现在如果我添加列表元素,设计如下: 这是摘要带的 jrxml:
我们的一份报告经常运行,其中包含大约 14,000 名司机。 参数的架构(在父报表中)如下所示: 选择(在子报表中)的 where 子句如下所示: and $X{IN, cast(e.l
背景:Jaspersoft studio 6. 有这个交叉表: 交叉表的数据集: select 'prod1' as prod, 'mon1' as month, 1 as val u
我想问一下。如何在 中的段落后添加中断一个文本字段 . 例如, 报告是为传达信息的特定目的而制作的文本作品(通常是写作、演讲、电视或电影)。 像这样:- "A report is a textual
我是一名优秀的程序员,十分优秀!