posts - 310, comments - 6939, trackbacks - 0, articles - 3
  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

整合Struts2+JasperReport Web报表应用示例

Posted on 2008-01-02 22:20 诗特林 阅读(26631) 评论(168)  编辑  收藏 所属分类: BI
 

整合Struts2+JasperReport Web报表应用示例

 

JasperReports作为一种优秀且开源的报表引擎,不利用太可惜了。同时,借助开源的JasperReports模板设计利器iReports,可以可视化的设计报表模板。基于Web的报表在很多项目中都是需要的。而随着Struts2的流行,就应该研究一下在Struts2下如何利用JasperReports进行报表输出。本示例比较简单,采用的数据源即为JavaBean,而没有采用复杂的数据库,其实原理是一样的。只是传递给JasperReports的参数随着连接方式的变化而略加修改而已。

准备工作

所使用的类库及Jar包如下图所示:


1.使用的Jar

开发环境:MyEclipse5.5+Eclipse3.2+JDK5.0+Tomcat5.5+Struts 2.0.6。当然,本该所提供的源代码下载中没有提供相关的lib,因为文件大太,如果需要,请留下email

源代码下载:Struts2AndJasperReport.rar

设计报表模板

本例中采用JavaBean作为数据源,用于显示People对象的一些基本属性,如所在序号、城市、姓名、地址,并对同一城市的人员进行汇总小结显示。

至于如何在iReports中设计模板文件,请在网上参考其它文档。这里不再详细解读,或有时间俺再另写文章来具体讲解如何在iReports中设计报表模板。WebRoot\jasper\jasper_template.jrxml代码如下:

<?xml version="1.0" encoding="UTF-8"  ?>
<!-- Created with iReport - A designer for JasperReports -->
<!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">
<jasperReport
         
name="jasper_template"
         columnCount
="1"
         printOrder
="Vertical"
         orientation
="Portrait"
         pageWidth
="595"
         pageHeight
="842"
         columnWidth
="535"
         columnSpacing
="0"
         leftMargin
="30"
         rightMargin
="30"
         topMargin
="20"
         bottomMargin
="20"
         whenNoDataType
="NoPages"
         isTitleNewPage
="false"
         isSummaryNewPage
="false">
    
<property name="ireport.scriptlethandling" value="0" />
    
<property name="ireport.encoding" value="UTF-8" />
    
<import value="java.util.*" />
    
<import value="net.sf.jasperreports.engine.*" />
    
<import value="net.sf.jasperreports.engine.data.*" />

    
<parameter name="rptMan" isForPrompting="false" class="java.lang.String">
        
<defaultValueExpression ><![CDATA["sterning"]]></defaultValueExpression>
    
</parameter>
    
<parameter name="rptDate" isForPrompting="false" class="java.lang.String">
        
<defaultValueExpression ><![CDATA["2008-01-12"]]></defaultValueExpression>
    
</parameter>

    
<field name="city" class="java.lang.String">
        
<fieldDescription><![CDATA[city]]></fieldDescription>
    
</field>
    
<field name="street" class="java.lang.String">
        
<fieldDescription><![CDATA[street]]></fieldDescription>
    
</field>
    
<field name="id" class="java.lang.Integer">
        
<fieldDescription><![CDATA[id]]></fieldDescription>
    
</field>
    
<field name="name" class="java.lang.String">
        
<fieldDescription><![CDATA[name]]></fieldDescription>
    
</field>

    
<variable name="CityNumber" class="java.lang.Integer" resetType="Group" resetGroup="CityGroup" calculation="Sum">
        
<initialValueExpression><![CDATA[($V{CityNumber} != null)?(new Integer($V{CityNumber}.intValue() + 1)):(new Integer(1))]]></initialValueExpression>
    
</variable>
    
<variable name="AllCity" class="java.lang.Integer" resetType="Report" calculation="Sum">
        
<initialValueExpression><![CDATA[($V{AllCity} != null)?(new Integer($V{AllCity}.intValue() + 1)):(new Integer(1))]]></initialValueExpression>
    
</variable>

        
<group  name="CityGroup" >
            
<groupExpression><![CDATA[$F{city}]]></groupExpression>
            
<groupHeader>
            
<band height="0"  isSplitAllowed="true" >
            
</band>
            
</groupHeader>
            
<groupFooter>
            
<band height="37"  isSplitAllowed="true" >
                
<staticText>
                    
<reportElement
                        
x="98"
                        y
="5"
                        width
="51"
                        height
="25"
                        key
="staticText-8"/>
                    
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
                    
<textElement>
                        
<font fontName="瀹嬩綋" pdfFontName="STSong-Light" size="14" isPdfEmbedded ="true" pdfEncoding ="UniGB-UCS2-H"/>
                    
</textElement>
                
<text><![CDATA[灏忚锛歖]></text>
                </staticText>
                <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
                    <reportElement
                        x="149"
                        y="5"
                        width="34"
                        height="25"
                        key="textField-7"/>
                    <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
                    <textElement>
                        <font fontName="瀹嬩綋" pdfFontName="STSong-Light" size="14" isPdfEmbedded ="true" pdfEncoding ="UniGB-UCS2-H"/>
                    </textElement>
                <textFieldExpression   class="java.lang.Integer"><![CDATA[$V{CityGroup_COUNT}
]]></textFieldExpression>
                
</textField>
                
<line direction="TopDown">
                    
<reportElement
                        
x="-30"
                        y
="36"
                        width
="593"
                        height
="0"
                        key
="line-5"/>
                    
<graphicElement stretchType="NoStretch"/>
                
</line>
            
</band>
            
</groupFooter>
        
</group>
        
<background>
            
<band height="0"  isSplitAllowed="true" >
            
</band>
        
</background>
        
<title>
            
<band height="62"  isSplitAllowed="true" >
                
<staticText>
                    
<reportElement
                        
x="20"
                        y
="0"
                        width
="484"
                        height
="57"
                        forecolor
="#FF0033"
                        key
="staticText-1"/>
                    
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
                    
<textElement textAlignment="Center">
                        
<font fontName="瀹嬩綋" pdfFontName="STSong-Light" size="36" isPdfEmbedded ="true" pdfEncoding ="UniGB-UCS2-H"/>
                    
</textElement>
                
<text><![CDATA[Struts2+JasperReports绀轰緥]]></text>
                
</staticText>
                
<line direction="TopDown">
                    
<reportElement
                        
x="-30"
                        y
="61"
                        width
="594"
                        height
="0"
                        key
="line-4"/>
                    
<graphicElement stretchType="NoStretch"/>
                
</line>
            
</band>
        
</title>
        
<pageHeader>
            
<band height="13"  isSplitAllowed="true" >
                
<line direction="TopDown">
                    
<reportElement
                        
x="-29"
                        y
="12"
                        width
="592"
                        height
="0"
                        key
="line-3"/>
                    
<graphicElement stretchType="NoStretch"/>
                
</line>
            
</band>
        
</pageHeader>
        
<columnHeader>
            
<band height="45"  isSplitAllowed="true" >
                
<staticText>
                    
<reportElement
                        
x="13"
                        y
="5"
                        width
="62"
                        height
="33"
                        key
="staticText-2"/>
                    
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
                    
<textElement>
                        
<font fontName="瀹嬩綋" pdfFontName="STSong-Light" size="24" isPdfEmbedded ="true" pdfEncoding ="UniGB-UCS2-H"/>
                    
</textElement>
                
<text><![CDATA[搴忓彿]]></text>
                
</staticText>
                
<staticText>
                    
<reportElement
                        
x="98"
                        y
="5"
                        width
="62"
                        height
="33"
                        key
="staticText-3"/>
                    
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
                    
<textElement>
                        
<font fontName="瀹嬩綋" pdfFontName="STSong-Light" size="24" isPdfEmbedded ="true" pdfEncoding ="UniGB-UCS2-H"/>
                    
</textElement>
                
<text><![CDATA[鍩庡競]]></text>
                
</staticText>
                
<staticText>
                    
<reportElement
                        
x="212"
                        y
="5"
                        width
="62"
                        height
="33"
                        key
="staticText-4"/>
                    
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
                    
<textElement>
                        
<font fontName="瀹嬩綋" pdfFontName="STSong-Light" size="24" isPdfEmbedded ="true" pdfEncoding ="UniGB-UCS2-H"/>
                    
</textElement>
                
<text><![CDATA[濮撳悕]]></text>
                
</staticText>
                
<staticText>
                    
<reportElement
                        
x="331"
                        y
="5"
                        width
="62"
                        height
="33"
                        key
="staticText-5"/>
                    
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
                    
<textElement>
                        
<font fontName="瀹嬩綋" pdfFontName="STSong-Light" size="24" isPdfEmbedded ="true" pdfEncoding ="UniGB-UCS2-H"/>
                    
</textElement>
                
<text><![CDATA[浣忓潃]]></text>
                
</staticText>
                
<line direction="TopDown">
                    
<reportElement
                        
x="-30"
                        y
="43"
                        width
="596"
                        height
="0"
                        key
="line-2"/>
                    
<graphicElement stretchType="NoStretch"/>
                
</line>
            
</band>
        
</columnHeader>
        
<detail>
            
<band height="43"  isSplitAllowed="true" >
                
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
                    
<reportElement
                        
x="13"
                        y
="7"
                        width
="62"
                        height
="30"
                        key
="textField-1"/>
                    
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
                    
<textElement>
                        
<font fontName="瀹嬩綋" pdfFontName="STSong-Light" size="14" isPdfEmbedded ="true" pdfEncoding ="UniGB-UCS2-H"/>
                    
</textElement>
                
<textFieldExpression   class="java.lang.Integer"><![CDATA[$F{id}]]></textFieldExpression>
                
</textField>
                
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
                    
<reportElement
                        
x="98"
                        y
="7"
                        width
="105"
                        height
="29"
                        key
="textField-2"/>
                    
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
                    
<textElement>
                        
<font fontName="瀹嬩綋" pdfFontName="STSong-Light" size="14" isPdfEmbedded ="true" pdfEncoding ="UniGB-UCS2-H"/>
                    
</textElement>
                
<textFieldExpression   class="java.lang.String"><![CDATA[$F{city}]]></textFieldExpression>
                
</textField>
                
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
                    
<reportElement
                        
x="212"
                        y
="8"
                        width
="100"
                        height
="28"
                        key
="textField-3"/>
                    
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
                    
<textElement>
                        
<font fontName="瀹嬩綋" pdfFontName="STSong-Light" size="14" isPdfEmbedded ="true" pdfEncoding ="UniGB-UCS2-H"/>
                    
</textElement>
                
<textFieldExpression   class="java.lang.String"><![CDATA[$F{name}]]></textFieldExpression>
                
</textField>
                
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
                    
<reportElement
                        
x="331"
                        y
="7"
                        width
="111"
                        height
="30"
                        key
="textField-4"/>
                    
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
                    
<textElement>
                        
<font fontName="瀹嬩綋" pdfFontName="STSong-Light" size="14" isPdfEmbedded ="true" pdfEncoding ="UniGB-UCS2-H"/>
                    
</textElement>
                
<textFieldExpression   class="java.lang.String"><![CDATA[$F{street}]]></textFieldExpression>
                
</textField>
                
<line direction="TopDown">
                    
<reportElement
                        
x="-30"
                        y
="37"
                        width
="593"
                        height
="0"
                        key
="line-1"/>
                    
<graphicElement stretchType="NoStretch"/>
                
</line>
            
</band>
        
</detail>
        
<columnFooter>
            
<band height="37"  isSplitAllowed="true" >
            
</band>
        
</columnFooter>
        
<pageFooter>
            
<band height="50"  isSplitAllowed="true" >
                
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
                    
<reportElement
                        
x="98"
                        y
="18"
                        width
="138"
                        height
="23"
                        key
="textField-8"/>
                    
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
                    
<textElement textAlignment="Right">
                        
<font fontName="瀹嬩綋" pdfFontName="STSong-Light" size="12" isPdfEmbedded ="true" pdfEncoding ="UniGB-UCS2-H"/>
                    
</textElement>
                
<textFieldExpression   class="java.lang.String"><![CDATA["椤垫暟 " + String.valueOf($V{PAGE_NUMBER}) + " of"]]></textFieldExpression>
                
</textField>
                
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Report" hyperlinkType="None"  hyperlinkTarget="Self" >
                    
<reportElement
                        
x="239"
                        y
="18"
                        width
="83"
                        height
="23"
                        key
="textField-9"/>
                    
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
                    
<textElement>
                        
<font fontName="瀹嬩綋" pdfFontName="STSong-Light" size="12" isPdfEmbedded ="true" pdfEncoding ="UniGB-UCS2-H"/>
                    
</textElement>
                
<textFieldExpression   class="java.lang.String"><![CDATA[" " + String.valueOf($V{PAGE_NUMBER})]]></textFieldExpression>
                
</textField>
            
</band>
        
</pageFooter>
        
<lastPageFooter>
            
<band height="50"  isSplitAllowed="true" >
            
</band>
        
</lastPageFooter>
        
<summary>
            
<band height="0"  isSplitAllowed="true" >
            
</band>
        
</summary>
</jasperReport>
 

这里需要说明的是,由于俺们中国的中文比较特殊,由此在PDF中显示的时候,需要一些额外的Jar包字体来支持。因此需要下载iTextAsian.jar包,此包专门用于显示亚洲的字符。

 

设计JavaBean

 

由本例中没有使用数据库,而是使用JavaBean作为JRDataSource,来传递给JasperReports作为数据源,因此只需要设计JavaBean\src\com\sterning\PeopleBean.java的代码很简单,只在字个字段:cityidnamestreet,代码如下所示:

package com.sterning;

public class PeopleBean
{
    
private String city = null;
    
private Integer id = null;
    
private String name = null;
    
private String street = null;

    
public PeopleBean(
        String pcity,
        Integer pid,
        String pname,
        String pstreet
        )
    
{
        city 
= pcity;
        id 
= pid;
        name 
= pname;
        street 
= pstreet;
    }


    
public PeopleBean getMe()
    
{
        
return this;
    }


    
public String getCity()
    
{
        
return city;
    }


    
public Integer getId()
    
{
        
return id;
    }


    
public String getName()
    
{
        
return name;
    }


    
public String getStreet()
    
{
        
return street;
    }

}


 

编译模板

其实表面上说是填充数据,其实就是填充一个List。具体的工具都是交给我们的JasperReports去完成。JasperReports要完成数据的填充工作,要经历将编译(将模板文件.jrxml编译成.jasper文件)、加载(加载.jasper文件)、填充(从数据源中取得数据并填充到.jasper二进制文件中)三大步骤。src\com\sterning\JasperAction.java,其代码如下所示:

package com.sterning;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

import net.sf.jasperreports.engine.JasperCompileManager;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionSupport;

public class JasperAction extends ActionSupport {
    
private static final long serialVersionUID = 1L;

    
private List<PeopleBean> myList;

    
public String execute() throws Exception {
        
//添加数据
        PeopleBean p1=new PeopleBean("长沙"new Integer(9), "李化""天洒路");
        PeopleBean p2
=new PeopleBean("长沙"new Integer(22), "王小样""呆小路564");
        PeopleBean p3
=new PeopleBean("南昌"new Integer(23), "王奸可""小顺路");
        PeopleBean p4
=new PeopleBean("南昌"new Integer(32), "李洒""顺濉路");
        PeopleBean p5
=new PeopleBean("武汉"new Integer(39), "张中尖""天洒路");
        PeopleBean p6
=new PeopleBean("武汉"new Integer(35), "陈主宁""天河路564");
        myList 
= new ArrayList<PeopleBean>();
        myList.add(p1);
        myList.add(p2);
        myList.add(p3);
        myList.add(p4);
        myList.add(p5);
        myList.add(p6);

        
try {
            String reportSource;
            reportSource 
= ServletActionContext.getServletContext()
                    .getRealPath(
"/jasper/jasper_template.jrxml");
            File parent 
= new File(reportSource).getParentFile();
            
//将.jrxml模板文件编译成为.jasper文件,当然,其文件名可以指定,如果没指定,则与.jrxml文件名一样.只是后缀不同而已
            JasperCompileManager.compileReportToFile(reportSource, new File(
                    parent, 
"compiled_jasper_template.jasper")
                    .getAbsolutePath());
        }
 catch (Exception e) {
            e.printStackTrace();
            
return ERROR;
        }

        
return SUCCESS;
    }


    
public List getMyList() {
        
return myList;
    }

}


 

配置Struts2文件

前面这些工作都是为JasperReports而作的。接下来就是将JasperReports集成到Struts2中。

1.  Web.xml

首先是Web.xml。这个文件配置比较简单,也比较常规,没什么好说,代码如下WebRoot\WEB-INF\web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi
="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation
="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
>
    
<filter>
        
<filter-name>struts2</filter-name>
        
<filter-class>
            org.apache.struts2.dispatcher.FilterDispatcher
        
</filter-class>
        
<init-param>
            
<param-name>config</param-name>
            
<param-value>
                struts-default.xml,struts-plugin.xml,struts.xml
            
</param-value>
        
</init-param>
    
</filter>
    
<filter-mapping>
        
<filter-name>struts2</filter-name>
        
<url-pattern>/*</url-pattern>
    
</filter-mapping>

    
<!-- The Welcome File List -->
    
<welcome-file-list>
        
<welcome-file>index.jsp</welcome-file>
    
</welcome-file-list>
</web-app>

 

2.  struts.xml

按理说struts.xml配置文件应该更加简单,但这里由于集成了JasperReports,所以看上去要复杂一点。先来看代码:src\ struts.xml

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd"
>
<struts>
    
<package name="default"
        extends
="struts-default,jasperreports-default">
        
<action name="PDF" class="com.sterning.JasperAction">
            
<result name="success" type="jasper">
                
<param name="location">
                    /jasper/compiled_jasper_template.jasper
                
</param>
                
<param name="dataSource">myList</param>
                
<param name="format">PDF</param>
            
</result>
        
</action>
        
<action name="HTML" class="com.sterning.JasperAction">
            
<result name="success" type="jasper">
                
<param name="location">
                    /jasper/compiled_jasper_template.jasper
                
</param>
                
<param name="dataSource">myList</param>
                
<param name="format">HTML</param>
            
</result>
        
</action>
        
<action name="XML" class="com.sterning.JasperAction">
            
<result name="success" type="jasper">
                
<param name="location">
                    /jasper/compiled_jasper_template.jasper
                
</param>
                
<param name="dataSource">myList</param>
                
<param name="format">XML</param>
            
</result>
        
</action>
        
<action name="CSV" class="com.sterning.JasperAction">
            
<result name="success" type="jasper">
                
<param name="location">
                    /jasper/compiled_jasper_template.jasper
                
</param>
                
<param name="dataSource">myList</param>
                
<param name="format">CSV</param>
            
</result>
        
</action>
        
<action name="XLS" class="com.sterning.JasperAction">
            
<result name="success" type="jasper">
                
<param name="location">
                    /jasper/compiled_jasper_template.jasper
                
</param>
                
<param name="dataSource">myList</param>
                
<param name="format">XLS</param>
            
</result>
        
</action>
    
</package>
</struts>
 

这里,当调用JasperActionexecute()方法成功后,返回后,可见有三个参数:location告诉JasperReports数据填充类二进制的.jasper文件的位置,dataSource指明使用什么数据源,format指明报表输出的格式。


 

页面文件

Index.jsp的代码非常的简单,如下:

<%@ page language="java" pageEncoding="GB2312"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    
<head>
        
<title>Struts2+ JasperReports 使用示例</title>
    
</head>
    
<body>
        
<href="HTML.action">HTML</a>
        
<br>
        
<href="PDF.action">PDF</a>
        
<br>
        
<href="XML.action">XML</a>
        
<br>
        
<href="CSV.action">CSV</a>
        
<br>
        
<href="XLS.action">XLS</a>
    
</body>
</html>

 

运行效果

1HTML格式

2.HTML格式

2PDF格式


3.PDF格式

3XML格式


4.XML格式

4Excel格式


5.Excel格式

评论共2页: 1 2 下一页 

评论

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2009-02-15 15:39 by jj
正在研究,能发一份给我么,谢谢。
shenzhengliang1@126.com

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2009-03-04 17:55 by 咯天
真煞笔 有乱码没看见啊!

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2009-03-07 21:23 by
谢谢,给我也发一份吧

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2009-03-07 21:24 by
bjihua@163.com

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2009-03-09 16:59 by fire1
麻烦给我一份 谢谢 jianchuan1216@gmail.com

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2009-03-18 09:17 by www
帮我发一份啊
liyan2007_2008@126.com

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2009-03-25 23:17 by zy9210
还能给我发一份不

zy9210@163.com

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2009-03-27 11:35 by snowduck
真是个好东西,正在学习这个东西,能否把lib也给我发一份呢?多谢!
snowduck@126.com

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2009-03-27 14:31 by jalon
我想学!请发给我一份,谢谢!

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2009-03-27 14:31 by jalon
531117763@qq.com

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2009-03-30 11:06 by 路人
麻烦你给我发一份 lib ,谢谢你了.........
万分感谢.........
my.java.life@163.com

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2009-04-02 19:35 by by过人
请给我一份lib,hyp00xp10@163.com
非常感谢
谢谢
谢谢
谢谢!

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2009-04-03 14:54 by csna
你好!我首次用这个做报表。不太会。能否传个例子。
newcsna@163.com
谢谢!!!!

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2009-04-07 10:59 by hj
能给我一份吗 jiao88168@sina.com 谢谢

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2009-04-07 16:49 by wufulai
能否发我一份源码吗?wufulail@163.com.不盛感激,

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2009-04-13 13:23 by qxm
请发我一份源码吗?qxmlucky@qq.com
谢谢

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2009-04-21 15:05 by cart
顶下楼主,
能给我发一份嘛。
小弟感激不尽
Email:cart_lhd@163.com

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2009-05-20 10:57 by amuer
顶,顶!
amuer2005@sina.com

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2009-06-19 12:18 by renxin
你好啊,请教你一个问题 我导出excel格式不行,别的都可以。这是什么原因吗。

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2009-06-19 12:20 by renxin
我的邮箱是 renxin@sinosoft.com.cn 谢谢你能告诉我。

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2009-06-23 15:52 by kpeng
谢谢我的邮箱290960990@qq.com

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2009-06-30 16:53 by 迷茫
楼主幸苦了,能给小弟一份不?邮箱:workanfei2008@163.com

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2009-07-01 11:07 by flexjyun
可以发份源码给我吗
endlessjava@163.com

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2009-10-20 16:00 by longx
怎么我发表就不行咯 ???
帮我发一份完整的可以跑的 谢谢!!!!
long435@sogou.com

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2009-10-27 09:24 by roundzheng
非常感谢您, 可以把源码给我一份吗 ?
email:dreamstar1020@163.com

# re: 整合Struts2+JasperReport Web报表应用示例[未登录]  回复  更多评论   

2009-10-29 17:03 by tiger
感谢楼主。楼主可以把需要的jar包,列出来啊!
我这有jar,但不知是哪些

# re: 整合Struts2+JasperReport Web报表应用示例[未登录]  回复  更多评论   

2009-10-29 17:35 by tiger
大哥,可以给我发一份jar吗?tigers20010@163.com

# re: 整合Struts2+JasperReport Web报表应用示例[未登录]  回复  更多评论   

2009-10-29 18:07 by tiger
各位下载的朋友,请注意:该楼主给的例子有错误。
害老子找个几个小时的。
其中在struts.xml中少了重要的一步:
<result-types>
<result-type name="jasper" class="org.apache.struts2.views.jasperreports.JasperReportsResult"/>
</result-types>

少了它,就一直会报错的。请各位同僚注意。

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2009-11-17 09:35 by liguangjun
顶下楼主,
能给我发一份嘛。
小弟感激不尽

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2009-11-17 09:37 by liguangjun
顶下楼主,
能给我发一份嘛。
小弟感激不尽!
Email:win545202955@163.com

再次感谢!

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2009-11-17 09:52 by liguangjun
楼主能否给我发一份相关的lib吗?感激不尽..

Email:win545202955@163.com

再次感谢!

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2009-12-01 17:34 by fanfan
谢谢楼主!!!
fanyiqian1989@gmail.com

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2009-12-27 00:33 by 米高阳
能不能发给我一份,谢谢!
Email:nuaamigaoyang@yahoo.cn
非常感谢

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2009-12-29 11:07 by 刘罡
你的源代码很好,可否给我发一份,我的邮箱是liu19860404@gmail.com。谢谢!

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2010-01-14 12:47 by 晓雷
能给我发一份嘛。
小弟感激不尽!
Email:540223967@qq.com

再次感谢!

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2010-01-20 15:11 by 卢威
很好的一篇文章 我现在很需要这东西 能发我一份吗 luwei2it@163.com

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2010-01-27 13:35 by chengtai.he
我用javabean做数据源为什么获取不到值呢?还请指点迷津

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2010-01-29 17:36 by 小俊
Email:3873792@qq.com
非常感谢!

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2010-02-08 13:49 by depyq
能给我发一份吗?谢谢
pangyongqun@163.com

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2010-03-01 10:17 by 匡叶平
能给我发一份吗?谢谢
kyp@hzdracom.com

# re: 整合Struts2+JasperReport Web报表应用示例[未登录]  回复  更多评论   

2010-03-19 10:49 by 菜鸟
小弟也急需一份~~wbc1985506@163.com
谢谢!

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2010-03-31 17:14 by 杨晨锐

楼主,谢谢给我发一份实例吧...

兄弟先谢谢了...

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2010-04-20 17:04 by 学习
楼主,谢谢给我发一份实例吧... hwei_820@hotmail.com

兄弟先谢谢了

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2010-05-17 10:16 by hzl
346156799@qq.com
能发一份吗

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2010-05-29 18:11 by enjoy
我操,,上面的都要代码 干什么??
难道大家手头都没在做相应的工作吗??看看不就行了么,我这里看了一看问题都解决了
想要直接拷一份呗
我怀疑是不是 大家是不是都是在凭空想啊,空中楼阁

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2010-06-04 15:18 by guest
请发一份,谢谢!hezhixue@gmail.com

# re: 整合Struts2+JasperReport Web报表应用示例[未登录]  回复  更多评论   

2010-06-07 09:23 by qq
请发一份我 lib 谢谢了
ben_1110000695@sina.com

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2010-06-11 16:35 by xiatian
楼主,发我一份吧,急需
kary1109@sina.com

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2010-08-03 16:59 by 郑成桥
48187537@qq.com

请发一下 谢谢你了

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2010-08-31 17:23 by 仰慕你的人
楼主可否发一份给我呢?谢谢
我的E-MAIL:haitao.wang@adpsz.com

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2011-03-23 16:46 by fdh_金色年华
刚开始接触报表,楼主可否发一份给我呢?非常谢谢!
e-mail:dhflab@163.com

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2011-03-30 16:34 by 王亚蓉
有急用,请楼主发给我一份代码,谢谢了,(*^__^*)

邮箱是: 673234684@qq.com

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2011-07-27 10:44 by xinfeikai
下载了你的源文件,里面没有jar包,网上找了半天不是版本一致 我现在项目还启动不来,你lib下的包能发布出来吗?或者给俺来发一份 谢谢 woshipanxin1314@126.com

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2011-09-27 14:23 by kid
辛苦一下,发我一份吧 237665137@qq.com

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2011-10-11 16:22 by 郭书敏
gu_oshumin@126.com

给我一份吧

# re: 整合Struts2+JasperReport Web报表应用示例[未登录]  回复  更多评论   

2011-11-01 17:24 by richard
楼主能给我一份吗?谢谢

rlp2006@126.com

# re: 整合Struts2+JasperReport Web报表应用示例[未登录]  回复  更多评论   

2011-11-02 15:33 by sunny
麻烦给我发份lib下的jar包吧,运行调测了很久加了jar包,还是报框架的错误。
459594639@qq.com
谢谢!

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2011-12-19 17:36 by dwt
给我发一份。谢谢
qf8505@yahoo.com.cn

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2011-12-26 22:05 by 陈丽平
能给我发一份吗,谢谢,clpliji@163.com

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2012-02-02 09:14 by Rike
是否能发一份lib 谢谢 wuwenbo21@163.com

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2012-04-26 15:51 by liuf
能发一份lib包给我吗,谢谢,lf379286483@163.com

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2012-06-06 09:18 by tekai
可以麻煩寄一份使用到的lib給我嗎??
top1615@hotmail.com.tw

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2012-07-31 10:11 by pang
楼主辛苦 发一份完整的给我吧 自己运行调试总是出现错误 ice_leman@sina.com 谢谢

# re: 整合Struts2+JasperReport Web报表应用示例[未登录]  回复  更多评论   

2012-08-06 11:46 by My
楼主能不能给我发一份,谢谢了,vip771331994@126.com

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2012-08-09 14:10 by wwy
能不能给我发下子lib里面的包 邮箱 android_xuan@126.com 谢谢!

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2012-08-22 17:22 by huangyong
楼主帮我发一份 jar 包

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2012-08-28 15:52 by qsdcr
楼主有无从数据库直接提取数据的例子??

# re: 整合Struts2+JasperReport Web报表应用示例[未登录]  回复  更多评论   

2013-01-03 09:59 by Alex
麻煩寄一份使用到的lib給我,谢谢楼主。
869732593@qq.com

# re: 整合Struts2+JasperReport Web报表应用示例[未登录]  回复  更多评论   

2013-03-01 14:23 by ashan
急需jar包一份, 谢谢楼主,liusc@aulei.cn

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2013-03-20 14:07 by
楼主,jar包发给我,可以吗?谢谢啦

邮箱:437535584@qq.com

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2013-03-21 09:57 by 刘丛
422580585@qq.com
谢谢 发我一份

# re: 整合Struts2+JasperReport Web报表应用示例[未登录]  回复  更多评论   

2013-03-28 09:00 by df
楼主给发一下Jar呗...谢谢楼主大神...zhanghz_zhu@163.com

# re: 整合Struts2+JasperReport Web报表应用示例[未登录]  回复  更多评论   

2013-04-04 21:31 by yuan
求楼主发一份~

# re: 整合Struts2+JasperReport Web报表应用示例[未登录]  回复  更多评论   

2013-04-04 21:32 by yuan
yh880709@163.com
忘了留邮箱了。。。

# re: 整合Struts2+JasperReport Web报表应用示例[未登录]  回复  更多评论   

2013-04-23 00:26 by mutou
请发份给我 谢谢
邮箱:519247235@qq.com

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2013-05-03 14:20 by 孙龙飞
请问,运行pdf文件必须要安装 adobe软件吗,包括类似 cvs等等

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2013-05-06 17:23 by 肖伟西
楼主给我一份可以不,现在非常需要。。。47371233@qq.com 万分感激

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2013-05-07 10:44 by wikk
很好 很好的东东 我需要lib gavic@163.com 谢谢楼主光荣无私的分享

# re: 整合Struts2+JasperReport Web报表应用示例[未登录]  回复  更多评论   

2013-08-12 15:50 by zhangwei
非常感谢楼主,求给我发一份km_wangguoqing@sina.com

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2013-08-20 15:48 by hwz
楼主,您好!因工作需要,我现在正在做报表,但是不会。帮忙发一份塞,谢谢!729967502@qq.com

# re: 整合Struts2+JasperReport Web报表应用示例[未登录]  回复  更多评论   

2013-11-17 19:15 by alex
麻烦楼主也给我发一份jar包...alex_fung@126.com。请问你的源码我是否还要重新建一个新的web project再导进去才能用??

# re: 整合Struts2+JasperReport Web报表应用示例[未登录]  回复  更多评论   

2014-01-10 19:28 by 东东
和强大,希望楼主给一份,学习学习,谢谢!dongshengqf@163.com

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2014-02-11 09:15 by 骑牛娶新娘
麻烦给我发份lib下的jar包吧,运行调测了很久加了jar包,还是报框架的错误。
1225161271@qq.com

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2014-04-02 13:45 by wwww
麻烦给我发份lib下的jar包吧,运行调测了很久加了jar包,还是报框架的错误,82254887@qq.com

# re: 整合Struts2+JasperReport Web报表应用示例[未登录]  回复  更多评论   

2014-04-12 11:43 by rex
jar包,谢谢! 2606684378@qq.com

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2014-07-18 11:02 by
麻烦楼主可以发我一份吗,我的邮箱2441644389@qq.com 谢谢啊 ,

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2014-08-09 15:55 by 求jar包
求完整的jar包,谢谢楼主! 7373646@qq.com

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2014-08-20 10:24 by FEI
您好,想请问下5.6.0的如何配置呢?我配置的一直报错,错误如下:
还请赐教,不胜感激。

java.lang.NoSuchMethodError: net.sf.jasperreports.engine.util.JRLoader.loadObject(Ljava/lang/String;)Ljava/lang/Object;

# re: 整合Struts2+JasperReport Web报表应用示例[未登录]  回复  更多评论   

2014-09-12 21:34 by wy
发我一份lib吧,谢谢楼主。
50449735@qq.com

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2014-11-04 11:45 by 11
@FEI
你的这个错解决了吗。我也报这个错。

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2014-11-25 17:39 by youngtwu
楼主,给我发一份lib吧,网上都找不到下载的jar包,我的邮箱是3092766168@qq.com

非常感谢!

# re: 整合Struts2+JasperReport Web报表应用示例[未登录]  回复  更多评论   

2014-12-18 16:37 by 小马
我的邮箱,13666368039@yeah.net,给我发一份,十分感谢!

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2015-02-25 07:56 by dusj
283450660@qq.com

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2015-03-23 15:24 by wangxginbo
1206370815@qq.com, 跪求一份,非常感谢!

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2015-03-31 10:43 by 冷月寒
跪求lib包,邮箱786034103@qq.com,谢谢了

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2015-05-19 18:51 by 许成卿
我的邮箱,13666368039@yeah.net,给我发一份,十分感谢!

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2015-05-19 18:52 by 许成卿
我的邮箱,xcq_1985@163.com,给我发一份,十分感谢!

# re: 整合Struts2+JasperReport Web报表应用示例[未登录]  回复  更多评论   

2015-06-05 23:13 by 小宇
我的邮箱,1912813835@qq.com,给我发一份,十分感谢!

# re: 整合Struts2+JasperReport Web报表应用示例  回复  更多评论   

2015-08-31 19:30 by 玉立琪
1035950226@qq.com,求源码

# re: 整合Struts2+JasperReport Web报表应用示例[未登录]  回复  更多评论   

2015-10-28 16:33 by sandy
1719736475@qq.com 求救
评论共2页: 1 2 下一页 

只有注册用户登录后才能发表评论。


网站导航: