我想在我的jasper报告中插入图像,摆动应用程序.所有图像都在一个包中.我想在jasper报告中设置图像的路径.这意味着,设置项目图像的路径.当整个项目位置发生变化时,有一个例外,说没有找到图像.请让我知道如何设置图像路径.
项目结构:MyProject
| -Source Packages
在源包下
| -Images
//我的图片在这里
| -Reports //我的jasper报告在哪里
| -MyJFrames |
如果我在iReports设计器中创建Jasper报告模板文件,是否可以防止在其数据源中的字段为空时显示静态文本字段?
我知道我可以使用一定数量的JavaScript来处理报表中的数据.如果字段值为NULL或为空,是否可能隐藏元素?
我在空白子报告上看到了很多问题,但没有一个提供我需要的信息。我有一份主报告:
<?xml version="1.0" encoding="UTF-8"?>
<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_report" pageWidth="595" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
<property name="ireport.zoom" value="1.0"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<parameter name="reportTitle" class="java.lang.String"/>
<parameter name="reportSubTitle" class="java.lang.String"/>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="65" splitType="Stretch">
<textField>
<reportElement x="0" y="0" width="555" height="20"/>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$P{reportTitle}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="434" y="40" width="80" height="20"/>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]></textFieldExpression>
</textField>
<textField evaluationTime="Report">
<reportElement x="514" y="40" width="40" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="20" …Run Code Online (Sandbox Code Playgroud) 请告诉我如何设置与MS SQL Server 2005和JasperReports的连接.
请告诉我连接的步骤.
我在我的应用程序中使用带有Spring MVC的JasperReports进行报告.基本上我首先在iReport 4.1.1中设计报表,然后通过jasper-view.xml将生成的.jasper文件放在我的类路径中
当请求到来时,控制器将所需的参数从Session放到Parameter Map并生成报告.
场景是我的主报告中有大约15个子报告.在所有这些报告中,仅打印符合条件(作为参数传递)的报告(通过Band的"Print When"选项进行控制)
我的问题是:如果我的报告不打印它是否会被执行(即其中的查询)?还是简单地跳过了?
我提出这个问题的理由是报告生成需要相当长的时间(大约2秒,根据我的说法,这对于我的申请来说太长了).
谢谢.