我有一个在 jasper 工作室设计的 jrxml 报告文件:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.6.0.final using JasperReports Library version 6.6.0 -->
<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="Sample_Blue_Table_Based" pageWidth="842" pageHeight="595" whenNoDataType="AllSectionsNoDetail" columnWidth="535" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="d4a1d5eb-82dd-412f-a620-202e4bdf9dba">
<property name="template.engine" value="tabular_template"/>
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="MyDBServer"/>
<property name="com.jaspersoft.studio.data.sql.tables" value=""/>
<style name="Table">
<box>
<pen lineWidth="1.0" lineColor="#000000"/>
<topPen lineWidth="1.0" lineColor="#000000"/>
<leftPen lineWidth="1.0" lineColor="#000000"/>
<bottomPen lineWidth="1.0" lineColor="#000000"/>
<rightPen lineWidth="1.0" lineColor="#000000"/>
</box>
</style>
<style name="Table_TH" mode="Transparent" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table_CH" mode="Transparent" forecolor="#B89F7D" backcolor="#70A9C6">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table_TD" mode="Transparent" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<subDataset name="tableDataset" uuid="d126342f-2c37-4323-99a6-4d0a9542aa8a">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="MyDBServer"/>
<queryString language="SQL">
<![CDATA[select * from users]]>
</queryString>
<field name="id" class="java.lang.Integer">
<property name="com.jaspersoft.studio.field.label" value="id"/>
<property name="com.jaspersoft.studio.field.tree.path" value="users"/>
</field>
<field name="created_at" class="java.sql.Timestamp">
<property name="com.jaspersoft.studio.field.label" value="created_at"/>
<property name="com.jaspersoft.studio.field.tree.path" value="users"/>
</field>
<field name="email" class="java.lang.String">
<property name="com.jaspersoft.studio.field.label" value="email"/>
<property name="com.jaspersoft.studio.field.tree.path" value="users"/>
</field>
<field name="firstName" class="java.lang.String">
<property name="com.jaspersoft.studio.field.label" value="firstName"/>
<property name="com.jaspersoft.studio.field.tree.path" value="users"/>
</field>
<field name="lastName" class="java.lang.String">
<property name="com.jaspersoft.studio.field.label" value="lastName"/>
<property name="com.jaspersoft.studio.field.tree.path" value="users"/>
</field>
<field name="updated_at" class="java.sql.Timestamp">
<property name="com.jaspersoft.studio.field.label" value="updated_at"/>
<property name="com.jaspersoft.studio.field.tree.path" value="users"/>
</field>
<field name="username" class="java.lang.String">
<property name="com.jaspersoft.studio.field.label" value="username"/>
<property name="com.jaspersoft.studio.field.tree.path" value="users"/>
</field>
<field name="status" class="java.lang.Boolean">
<property name="com.jaspersoft.studio.field.label" value="status"/>
<property name="com.jaspersoft.studio.field.tree.path" value="users"/>
</field>
</subDataset>
<queryString>
<![CDATA[]]>
</queryString>
<title>
<band height="72">
<frame>
<reportElement mode="Opaque" x="-20" y="-20" width="842" height="92" backcolor="#4AC416" uuid="6321f5e3-86eb-444f-acc1-8daaaa0d6c60"/>
<staticText>
<reportElement x="20" y="20" width="320" height="43" forecolor="#FFFFFF" uuid="9e48917a-7b59-4ffd-baad-725f45563194"/>
<textElement>
<font size="34" isBold="true"/>
</textElement>
<text><![CDATA[Admin App Users]]></text>
</staticText>
<staticText>
<reportElement x="650" y="46" width="180" height="20" forecolor="#FFFFFF" uuid="0a399baa-bad3-4b1a-9fe3-bb1c563e6a27"/>
<textElement textAlignment="Right">
<font size="14" isBold="false"/>
</textElement>
<text><![CDATA[Application Users Report]]></text>
</staticText>
</frame>
</band>
</title>
<pageHeader>
<band height="13"/>
</pageHeader>
<pageFooter>
<band height="17">
<textField>
<reportElement mode="Opaque" x="0" y="4" width="515" height="13" backcolor="#E6E6E6" uuid="fed27553-a6c4-4a8a-9056-2f6f2589a3e5"/>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]></textFieldExpression>
</textField>
<textField evaluationTime="Report">
<reportElement mode="Opaque" x="515" y="4" width="40" height="13" backcolor="#E6E6E6" uuid="9f5ad531-d413-49c9-874b-8b99e8150fa6"/>
<textFieldExpression><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<textField pattern="EEEEE dd MMMMM yyyy">
<reportElement x="0" y="4" width="100" height="13" uuid="fc593335-5cbf-4caf-97b3-ff897c676bde"/>
<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
</textField>
</band>
</pageFooter>
<summary>
<band height="200" splitType="Stretch">
<property name="local_mesure_unitheight" value="pixel"/>
<componentElement>
<reportElement x="0" y="0" width="806" height="200" uuid="01fed4d0-1b62-44ff-9fa5-e47ff6987d68">
<property name="com.jaspersoft.studio.table.style.table_header" value="Table_TH"/>
<property name="com.jaspersoft.studio.table.style.column_header" value="Table_CH"/>
<property name="com.jaspersoft.studio.table.style.detail" value="Table_TD"/>
</reportElement>
<jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd">
<datasetRun subDataset="tableDataset" uuid="2ad3f0b0-b1fd-40d9-a08f-170bf2519948">
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
</datasetRun>
<jr:column width="60" uuid="99ec822c-fb05-4f72-abd4-5f009620a549">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column1"/>
<jr:tableHeader style="Table_TH" height="30" rowSpan="1"/>
<jr:tableFooter style="Table_TH" height="30" rowSpan="1"/>
<jr:columnHeader style="Table_CH" height="30" rowSpan="1">
<staticText>
<reportElement mode="Transparent" x="0" y="0" width="60" height="30" forecolor="#006699" backcolor="#E6E6E6" uuid="06b3eded-dc90-4b57-9d0e-c51c6f342892"/>
<textElement textAlignment="Center">
<font size="14" isBold="true"/>
</textElement>
<text><![CDATA[ID]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter style="Table_CH" height="30" rowSpan="1"/>
<jr:detailCell style="Table_TD" height="30">
<textField>
<reportElement key="" x="0" y="0" width="60" height="30" uuid="19c36999-b01b-4bbd-a41e-c53ae0c80afd"/>
<box leftPadding="2"/>
<textElement textAlignment="Center">
<font fontName="Arial" size="14"/>
</textElement>
<textFieldExpression><![CDATA[$F{id}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="140" uuid="2483833e-c55e-4a69-8868-9b08db7559c0">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column4"/>
<jr:tableHeader style="Table_TH" height="30" rowSpan="1"/>
<jr:tableFooter style="Table_TH" height="30" rowSpan="1"/>
<jr:columnHeader style="Table_CH" height="30" rowSpan="1">
<staticText>
<reportElement mode="Transparent" x="0" y="0" width="140" height="30" forecolor="#006699" backcolor="#E6E6E6" uuid="9c786800-8901-47ae-bd4a-3c01204abd4d"/>
<textElement textAlignment="Center">
<font size="14" isBold="true"/>
</textElement>
<text><![CDATA[First Name]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter style="Table_CH" height="30" rowSpan="1"/>
<jr:detailCell style="Table_TD" height="30">
<textField>
<reportElement key="" x="0" y="0" width="140" height="30" uuid="d7b6cf06-c37f-4ec1-a519-3e7fe2d7be8b"/>
<box leftPadding="2"/>
<textElement>
<font fontName="Arial" size="14"/>
</textElement>
<textFieldExpression><![CDATA[$F{firstName}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="140" uuid="8d185e10-164e-420a-8a7f-d159ff9cb691">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column5"/>
<jr:tableHeader style="Table_TH" height="30" rowSpan="1"/>
<jr:tableFooter style="Table_TH" height="30" rowSpan="1"/>
<jr:columnHeader style="Table_CH" height="30" rowSpan="1">
<staticText>
<reportElement mode="Transparent" x="0" y="0" width="140" height="30" forecolor="#006699" backcolor="#E6E6E6" uuid="946eda2c-149c-4eb4-a929-cca937fb6393"/>
<textElement textAlignment="Center">
<font size="14" isBold="true"/>
</textElement>
<text><![CDATA[Last Name]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter style="Table_CH" height="30" rowSpan="1"/>
<jr:detailCell style="Table_TD" height="30">
<textField>
<reportElement key="" x="0" y="0" width="140" height="30" uuid="09d3f107-6c04-4587-bf7a-91e871ce4f3b"/>
<box leftPadding="2"/>
<textElement>
<font fontName="Arial" size="14"/>
</textElement>
<textFieldExpression><![CDATA[$F{lastName}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="130" uuid="395a497b-e0fc-4850-9f10-e41d4fd41035">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column6"/>
<jr:tableHeader style="Table_TH" height="30" rowSpan="1"/>
<jr:tableFooter style="Table_TH" height="30" rowSpan="1"/>
<jr:columnHeader style="Table_CH" height="30" rowSpan="1">
<staticText>
<reportElement mode="Transparent" x="0" y="0" width="130" height="30" forecolor="#006699" backcolor="#E6E6E6" uuid="1912c136-2a05-4089-ae91-54a5d815bc92"/>
<textElement textAlignment="Center">
<font size="14" isBold="true"/>
</textElement>
<text><![CDATA[Username]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter style="Table_CH" height="30" rowSpan="1"/>
<jr:detailCell style="Table_TD" height="30">
<textField>
<reportElement key="" x="0" y="0" width="130" height="30" uuid="cb9efd41-06b7-4059-a6ec-0fb35ccdbbc2"/>
<box leftPadding="2"/>
<textElement textAlignment="Left">
<font fontName="Arial" size="14"/>
</textElement>
<textFieldExpression><![CDATA[$F{username}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="160" uuid="3c37b453-c14e-41af-af30-696eac992472">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column3"/>
<jr:tableHeader style="Table_TH" height="30" rowSpan="1"/>
<jr:tableFooter style="Table_TH" height="30" rowSpan="1"/>
<jr:columnHeader style="Table_CH" height="30" rowSpan="1">
<staticText>
<reportElement mode="Transparent" x="0" y="0" width="160" height="30" forecolor="#006699" backcolor="#E6E6E6" uuid="58e2962c-e1f6-4649-8bd3-3e410fa58674"/>
<textElement textAlignment="Center">
<font size="14" isBold="true"/>
</textElement>
<text><![CDATA[Email]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter style="Table_CH" height="30" rowSpan="1"/>
<jr:detailCell style="Table_TD" height="30">
<textField>
<reportElement key="" x="0" y="0" width="160" height="30" uuid="702a303c-9c29-4119-8156-8eb9bac28b7d"/>
<box leftPadding="2"/>
<textElement textAlignment="Left">
<font fontName="Arial" size="14"/>
</textElement>
<textFieldExpression><![CDATA[$F{email}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="50" uuid="5a8d7002-6adc-4cff-9e7e-132ed9316b8e">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column7"/>
<jr:tableHeader style="Table_TH" height="30" rowSpan="1"/>
<jr:tableFooter style="Table_TH" height="30" rowSpan="1"/>
<jr:columnHeader style="Table_CH" height="30" rowSpan="1">
<staticText>
<reportElement mode="Transparent" x="0" y="0" width="50" height="30" forecolor="#006699" backcolor="#E6E6E6" uuid="9ec69fab-1e14-49cf-ab25-1e8b037da361"/>
<textElement textAlignment="Center">
<font size="14" isBold="true"/>
</textElement>
<text><![CDATA[A]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter style="Table_CH" height="30" rowSpan="1"/>
<jr:detailCell style="Table_TD" height="30">
<textField>
<reportElement key="" x="0" y="0" width="50" height="30" uuid="abfefc2d-93c3-4d65-afdc-5e9304224a32"/>
<box leftPadding="2"/>
<textElement textAlignment="Center">
<font fontName="Arial" size="14"/>
</textElement>
<textFieldExpression><![CDATA[$F{status}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="120" uuid="1af5f085-9784-49d9-b3b8-17cf34f4ac84">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column2"/>
<jr:tableHeader style="Table_TH" height="30" rowSpan="1"/>
<jr:tableFooter style="Table_TH" height="30" rowSpan="1"/>
<jr:columnHeader style="Table_CH" height="30" rowSpan="1">
<staticText>
<reportElement mode="Transparent" x="0" y="0" width="120" height="30" forecolor="#006699" backcolor="#E6E6E6" uuid="fd3401b4-a35c-435b-9c9c-9ba9840db3b8"/>
<textElement textAlignment="Center">
<font size="14" isBold="true"/>
</textElement>
<text><![CDATA[Created At]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter style="Table_CH" height="30" rowSpan="1"/>
<jr:detailCell style="Table_TD" height="30">
<textField>
<reportElement key="" x="0" y="0" width="120" height="30" uuid="9147c910-e8b4-4a79-8225-ea490c1de8a9"/>
<box leftPadding="2"/>
<textElement>
<font fontName="Arial" size="14"/>
</textElement>
<textFieldExpression><![CDATA[$F{created_at}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
</band>
</summary>
</jasperReport>
我点击了此处的链接将其与冲刺启动应用程序集成
spring框架和spring JPA中的Jasper report
运行应用程序时出现以下错误,并显示一个空白报告。
Pleassssssse 帮助我将从工作室生成的报告集成到Spring启动。
(我是java新手)
这里是我的报表控制器方法
@RequestMapping( method = RequestMethod.GET)
public void report(HttpServletResponse response) throws Exception {
response.setContentType("text/html");
JRBeanCollectionDataSource dataSource = new JRBeanCollectionDataSource(userReportService.report());
InputStream inputStream = this.getClass().getResourceAsStream("/reports/users_report.jrxml");
JasperReport jasperReport = JasperCompileManager.compileReport(inputStream);
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, null, dataSource);
HtmlExporter exporter = new HtmlExporter(DefaultJasperReportsContext.getInstance());
exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
exporter.setExporterOutput(new SimpleHtmlExporterOutput(response.getWriter()));
exporter.exportReport();
}
我正在传递 json 数据作为数据源
我在这个stackoverflow问题中找到了解决方案,答案中突出显示的步骤是:
此外,我修改了报告文件字段声明并删除了那里的所有 jasper 工作室属性。
执行此步骤并修改我的报告文件和控制器后,它起作用了。这是我的新控制器方法:
public void report(HttpServletResponse response) throws Exception {
response.setContentType("text/html");
List data = userReportService.report();
JRBeanCollectionDataSource dataSource = new JRBeanCollectionDataSource(data);
Map parameters = new HashMap();
parameters.put("test", data.get(0));
parameters.put("DS1", dataSource);
InputStream inputStream = this.getClass().getResourceAsStream("/reports/users_report.jrxml");
JasperReport jasperReport = JasperCompileManager.compileReport(inputStream);
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, new JREmptyDataSource());
HtmlExporter exporter = new HtmlExporter(DefaultJasperReportsContext.getInstance());
exporter.setExporterInput(new SimpleExporterInput(jasperPrint));
exporter.setExporterOutput(new SimpleHtmlExporterOutput(response.getWriter()));
exporter.exportReport();
}
我的新jrxml文件是这样的:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.6.0.final using JasperReports Library version 6.6.0 -->
<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="Sample_Blue_Table_Based" pageWidth="842" pageHeight="595" whenNoDataType="AllSectionsNoDetail" columnWidth="535" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="d4a1d5eb-82dd-412f-a620-202e4bdf9dba">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
<style name="Table">
<box>
<pen lineWidth="1.0" lineColor="#000000"/>
<topPen lineWidth="1.0" lineColor="#000000"/>
<leftPen lineWidth="1.0" lineColor="#000000"/>
<bottomPen lineWidth="1.0" lineColor="#000000"/>
<rightPen lineWidth="1.0" lineColor="#000000"/>
</box>
</style>
<style name="Table_TH" mode="Transparent" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table_CH" mode="Transparent" forecolor="#B89F7D" backcolor="#70A9C6">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table_TD" mode="Transparent" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<subDataset name="tableDataset" uuid="d126342f-2c37-4323-99a6-4d0a9542aa8a">
<queryString language="json">
<![CDATA[]]>
</queryString>
<field name="id" class="java.lang.Integer"/>
<field name="firstName" class="java.lang.String"/>
<field name="lastName" class="java.lang.String"/>
<field name="username" class="java.lang.String"/>
<field name="email" class="java.lang.String"/>
<field name="status" class="java.lang.Boolean"/>
<field name="created_at" class="java.sql.Timestamp"/>
</subDataset>
<parameter name="DS1" class="net.sf.jasperreports.engine.data.JRBeanCollectionDataSource"/>
<title>
<band height="72">
<frame>
<reportElement mode="Opaque" x="-20" y="-20" width="842" height="92" backcolor="#4AC416" uuid="6321f5e3-86eb-444f-acc1-8daaaa0d6c60"/>
<staticText>
<reportElement x="20" y="20" width="320" height="43" forecolor="#FFFFFF" uuid="9e48917a-7b59-4ffd-baad-725f45563194"/>
<textElement>
<font size="34" isBold="true"/>
</textElement>
<text><![CDATA[Admin App Users]]></text>
</staticText>
<staticText>
<reportElement x="650" y="46" width="180" height="20" forecolor="#FFFFFF" uuid="0a399baa-bad3-4b1a-9fe3-bb1c563e6a27"/>
<textElement textAlignment="Right">
<font size="14" isBold="false"/>
</textElement>
<text><![CDATA[Application Users Report]]></text>
</staticText>
</frame>
</band>
</title>
<pageHeader>
<band height="13"/>
</pageHeader>
<pageFooter>
<band height="17">
<textField>
<reportElement mode="Opaque" x="0" y="4" width="760" height="13" backcolor="#E6E6E6" uuid="fed27553-a6c4-4a8a-9056-2f6f2589a3e5"/>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]></textFieldExpression>
</textField>
<textField evaluationTime="Report">
<reportElement mode="Opaque" x="762" y="4" width="40" height="13" backcolor="#E6E6E6" uuid="9f5ad531-d413-49c9-874b-8b99e8150fa6"/>
<textFieldExpression><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<textField pattern="EEEEE dd MMMMM yyyy">
<reportElement x="0" y="4" width="100" height="13" uuid="fc593335-5cbf-4caf-97b3-ff897c676bde"/>
<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
</textField>
</band>
</pageFooter>
<summary>
<band height="200" splitType="Stretch">
<property name="local_mesure_unitheight" value="pixel"/>
<componentElement>
<reportElement x="0" y="0" width="806" height="200" uuid="01fed4d0-1b62-44ff-9fa5-e47ff6987d68">
<property name="com.jaspersoft.studio.table.style.table_header" value="Table_TH"/>
<property name="com.jaspersoft.studio.table.style.column_header" value="Table_CH"/>
<property name="com.jaspersoft.studio.table.style.detail" value="Table_TD"/>
</reportElement>
<jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd">
<datasetRun subDataset="tableDataset" uuid="ee7a04e1-1abd-4fc2-baf5-52183f1eaa43">
<datasetParameter name="REPORT_DATA_SOURCE">
<datasetParameterExpression><![CDATA[$P{DS1}]]></datasetParameterExpression>
</datasetParameter>
</datasetRun>
<jr:column width="60" uuid="99ec822c-fb05-4f72-abd4-5f009620a549">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column1"/>
<jr:tableFooter style="Table_TH" height="30" rowSpan="1"/>
<jr:columnHeader style="Table_CH" height="30" rowSpan="1">
<staticText>
<reportElement mode="Transparent" x="0" y="0" width="60" height="30" forecolor="#006699" backcolor="#E6E6E6" uuid="06b3eded-dc90-4b57-9d0e-c51c6f342892"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="14" isBold="true"/>
</textElement>
<text><![CDATA[ID]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter style="Table_CH" height="30" rowSpan="1"/>
<jr:detailCell style="Table_TD" height="30">
<textField>
<reportElement key="" x="0" y="0" width="60" height="30" uuid="19c36999-b01b-4bbd-a41e-c53ae0c80afd"/>
<box leftPadding="2"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Arial" size="14"/>
</textElement>
<textFieldExpression><![CDATA[$F{id}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="140" uuid="2483833e-c55e-4a69-8868-9b08db7559c0">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column2"/>
<jr:tableFooter style="Table_TH" height="30" rowSpan="1"/>
<jr:columnHeader style="Table_CH" height="30" rowSpan="1">
<staticText>
<reportElement mode="Transparent" x="0" y="0" width="140" height="30" forecolor="#006699" backcolor="#E6E6E6" uuid="9c786800-8901-47ae-bd4a-3c01204abd4d"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="14" isBold="true"/>
</textElement>
<text><![CDATA[First Name]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter style="Table_CH" height="30" rowSpan="1"/>
<jr:detailCell style="Table_TD" height="30">
<textField>
<reportElement key="" x="0" y="0" width="140" height="30" uuid="d7b6cf06-c37f-4ec1-a519-3e7fe2d7be8b"/>
<box leftPadding="2"/>
<textElement verticalAlignment="Middle">
<font fontName="Arial" size="14"/>
</textElement>
<textFieldExpression><![CDATA[$F{firstName}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="140" uuid="8d185e10-164e-420a-8a7f-d159ff9cb691">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column3"/>
<jr:tableFooter style="Table_TH" height="30" rowSpan="1"/>
<jr:columnHeader style="Table_CH" height="30" rowSpan="1">
<staticText>
<reportElement mode="Transparent" x="0" y="0" width="140" height="30" forecolor="#006699" backcolor="#E6E6E6" uuid="946eda2c-149c-4eb4-a929-cca937fb6393"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="14" isBold="true"/>
</textElement>
<text><![CDATA[Last Name]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter style="Table_CH" height="30" rowSpan="1"/>
<jr:detailCell style="Table_TD" height="30">
<textField>
<reportElement key="" x="0" y="0" width="140" height="30" uuid="09d3f107-6c04-4587-bf7a-91e871ce4f3b"/>
<box leftPadding="2"/>
<textElement verticalAlignment="Middle">
<font fontName="Arial" size="14"/>
</textElement>
<textFieldExpression><![CDATA[$F{lastName}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="130" uuid="395a497b-e0fc-4850-9f10-e41d4fd41035">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column4"/>
<jr:tableFooter style="Table_TH" height="30" rowSpan="1"/>
<jr:columnHeader style="Table_CH" height="30" rowSpan="1">
<staticText>
<reportElement mode="Transparent" x="0" y="0" width="130" height="30" forecolor="#006699" backcolor="#E6E6E6" uuid="1912c136-2a05-4089-ae91-54a5d815bc92"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="14" isBold="true"/>
</textElement>
<text><![CDATA[Username]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter style="Table_CH" height="30" rowSpan="1"/>
<jr:detailCell style="Table_TD" height="30">
<textField>
<reportElement key="" x="0" y="0" width="130" height="30" uuid="cb9efd41-06b7-4059-a6ec-0fb35ccdbbc2"/>
<box leftPadding="2"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="Arial" size="14"/>
</textElement>
<textFieldExpression><![CDATA[$F{username}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="160" uuid="3c37b453-c14e-41af-af30-696eac992472">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column5"/>
<jr:tableFooter style="Table_TH" height="30" rowSpan="1"/>
<jr:columnHeader style="Table_CH" height="30" rowSpan="1">
<staticText>
<reportElement mode="Transparent" x="0" y="0" width="160" height="30" forecolor="#006699" backcolor="#E6E6E6" uuid="58e2962c-e1f6-4649-8bd3-3e410fa58674"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="14" isBold="true"/>
</textElement>
<text><![CDATA[Email]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter style="Table_CH" height="30" rowSpan="1"/>
<jr:detailCell style="Table_TD" height="30">
<textField>
<reportElement key="" x="0" y="0" width="160" height="30" uuid="702a303c-9c29-4119-8156-8eb9bac28b7d"/>
<box leftPadding="2"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="Arial" size="14"/>
</textElement>
<textFieldExpression><![CDATA[$F{email}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="50" uuid="5a8d7002-6adc-4cff-9e7e-132ed9316b8e">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column6"/>
<jr:tableFooter style="Table_TH" height="30" rowSpan="1"/>
<jr:columnHeader style="Table_CH" height="30" rowSpan="1">
<staticText>
<reportElement mode="Transparent" x="0" y="0" width="50" height="30" forecolor="#006699" backcolor="#E6E6E6" uuid="9ec69fab-1e14-49cf-ab25-1e8b037da361"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="14" isBold="true"/>
</textElement>
<text><![CDATA[A]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter style="Table_CH" height="30" rowSpan="1"/>
<jr:detailCell style="Table_TD" height="30">
<textField>
<reportElement key="" x="0" y="0" width="50" height="30" uuid="abfefc2d-93c3-4d65-afdc-5e9304224a32"/>
<box leftPadding="2"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="Arial" size="14"/>
</textElement>
<textFieldExpression><![CDATA[$F{status}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="120" uuid="1af5f085-9784-49d9-b3b8-17cf34f4ac84">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column7"/>
<jr:tableFooter style="Table_TH" height="30" rowSpan="1"/>
<jr:columnHeader style="Table_CH" height="30" rowSpan="1">
<staticText>
<reportElement mode="Transparent" x="0" y="0" width="120" height="30" forecolor="#006699" backcolor="#E6E6E6" uuid="fd3401b4-a35c-435b-9c9c-9ba9840db3b8"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="14" isBold="true"/>
</textElement>
<text><![CDATA[Created At]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter style="Table_CH" height="30" rowSpan="1"/>
<jr:detailCell style="Table_TD" height="30">
<textField>
<reportElement key="" x="0" y="0" width="120" height="30" uuid="9147c910-e8b4-4a79-8225-ea490c1de8a9"/>
<box leftPadding="2"/>
<textElement verticalAlignment="Middle">
<font fontName="Arial" size="14"/>
</textElement>
<textFieldExpression><![CDATA[$F{created_at}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
</band>
</summary>
</jasperReport>
我希望这能为像我这样的新手省去一些麻烦,感谢@PetterFriberg
我正在我的服务中添加SSO功能,以允许客户使用他们的广告帐户登录。为此,我使用componentpro中的SAML组件。com执行安全交互的正确方法是什么: < li >从IdP方面:除了IdP url,客户还应该向我的服务提供什么?任何只包含公钥的证书? < li >从服务提供商的角度:我应该向客户提供什么? < li >选择的SAML工具使用证书对发送给IdP的SAML请求进行签名,并对来自I
嗨,我正在尝试连接我的ElasticSearch客户端到我的本地主机,并尝试从那里获得索引。 curl-xput'http://localhost:9200/twitter/'curl-xput'http://localhost:9200/twitter/_mapping/tweet'-d'{ “tweet”:{“properties”:{ “message”:{“type”:“string”,“
问题内容: 我开始在Go中编写服务器端应用程序。我想使用Accept- Encoding请求标头来确定是否GZIP响应实体。我曾希望找到一种直接使用http.Serve或http.ServeFile方法执行此操作的方法。 这是一个很普遍的要求。我错过了什么还是我需要推出自己的解决方案? 问题答案: 目前尚无对gzip压缩HTTP响应的“开箱即用”支持。但是添加它非常简单。看一下 https://g
问题内容: 我有一个下面的SQL表: 我正在使用另一个表来存储值,例如: 要将值插入这些表中,我正在使用存储过程(其中一部分): 动态执行将引发一个异常,即不允许隐式转换sql_variant。有什么方法可以将sql_variant类型转换为varchar提供的类型?如: 其中@valueType是varchar而不是datetype 问题答案: 是的,您可以将参数作为传递给,但是您需要使用“转换
当somehelper类中的任何方法(将传播行为设置为“requires_new”的事务块)中出现某些异常时,为什么调用方类中不处理它(具有默认传播行为的事务块)?我看到的不是消息“catch inside doOperationMetadata of Impl class”,而是消息“catch inside callServiceMethod of Controller class”。
问题内容: 在Swift中处理可选选项的习惯用法似乎过于冗长,如果您只想在nil为零的情况下提供默认值,则它是: 涉及不必要地复制代码,或 这不需要是常数。 Scala的Option monad(与Swift的Optional基本相同)具有用于此目的的方法: 我想念什么吗?Swift已经有一种紧凑的方式做到这一点吗?否则,是否可以在扩展名中为Optional 定义? 问题答案: 更新资料 苹果现在