??xml version="1.0" encoding="utf-8" standalone="yes"?>成人h小游戏,久久九九国产精品怡红院,精品欧美一区二区三区http://www.aygfsteel.com/codelife2010/代码人生zh-cnThu, 19 Jun 2025 19:06:14 GMTThu, 19 Jun 2025 19:06:14 GMT60创徏临时表以?qing)?f)时表的维护工?/title><link>http://www.aygfsteel.com/codelife2010/archive/2010/11/30/339392.html</link><dc:creator>老鼠׃?/dc:creator><author>老鼠׃?/author><pubDate>Tue, 30 Nov 2010 06:23:00 GMT</pubDate><guid>http://www.aygfsteel.com/codelife2010/archive/2010/11/30/339392.html</guid><wfw:comment>http://www.aygfsteel.com/codelife2010/comments/339392.html</wfw:comment><comments>http://www.aygfsteel.com/codelife2010/archive/2010/11/30/339392.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/codelife2010/comments/commentRss/339392.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/codelife2010/services/trackbacks/339392.html</trackback:ping><description><![CDATA[<hr /> create global temporary table tmp_tablename<br /> <br /> 如果要调式(f)时表Q就必须(f)时表固化到数据库中? <img src ="http://www.aygfsteel.com/codelife2010/aggbug/339392.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/codelife2010/" target="_blank">老鼠׃?/a> 2010-11-30 14:23 <a href="http://www.aygfsteel.com/codelife2010/archive/2010/11/30/339392.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>iReport 昄不同的字体类型的textfieldhttp://www.aygfsteel.com/codelife2010/archive/2010/11/19/338477.html老鼠׃?/dc:creator>老鼠׃?/author>Fri, 19 Nov 2010 06:23:00 GMThttp://www.aygfsteel.com/codelife2010/archive/2010/11/19/338477.htmlhttp://www.aygfsteel.com/codelife2010/comments/338477.htmlhttp://www.aygfsteel.com/codelife2010/archive/2010/11/19/338477.html#Feedback0http://www.aygfsteel.com/codelife2010/comments/commentRss/338477.htmlhttp://www.aygfsteel.com/codelife2010/services/trackbacks/338477.html     2、设|?个textfield覆盖在上面设|不同的样式Q最重要是讄print when Exception的属性?

]]>
转蝲http://www.aygfsteel.com/codelife2010/archive/2010/11/19/338445.html老鼠׃?/dc:creator>老鼠׃?/author>Fri, 19 Nov 2010 01:24:00 GMThttp://www.aygfsteel.com/codelife2010/archive/2010/11/19/338445.htmlhttp://www.aygfsteel.com/codelife2010/comments/338445.htmlhttp://www.aygfsteel.com/codelife2010/archive/2010/11/19/338445.html#Feedback0http://www.aygfsteel.com/codelife2010/comments/commentRss/338445.htmlhttp://www.aygfsteel.com/codelife2010/services/trackbacks/338445.htmliReport 动态设|属?/a> 文章分类:l合技?/a>

   遇到一个问题:(x)Ҏ(gu)姓名的长度不同,需要设|不同的字号Q如果是老外可能q要更改字体?/p>

 

  最后通过在iReport中徏立conditional style 解决了?/p>

 

  讄如下Q?/p>

 

   1.右键 style-->d-->style

   2.选中当前的styleQ在属性面板更改其属?/p>

        nameQstyle的名?/p>

        default style: 是否默认的styleQ如果选中的话则此style做为默认的style。界面上的元素如果没有设|属性和上style属性没有设|ؓ(f)其它styleӞ则会(x)默认按照default style讄该元素的属性。当有多个style存在Ӟ只能又一个默认的style?/p>

       opaqueQ设|透明度?/p>

       其它的属性和讄field的属性一栗?/p>

  3.右键 当前的style-->d conditional style

  4.选中新徏的conditional  styleQ在属性面板中更改其属?/p>

     condition expression : 讄conditional style“工作”的条Ӟq个属性最重要Q其它的属性和讄style的属性相同?/p>

 

      比如现在Ҏ(gu)xmQ姓名)field的长度设|是否应用当前的conditional styleQ?/p>

 

    condition  expression 的|(x)new BooleanQ?F{xm}.length()>4Q?/p>

                                              ?nbsp; $F{xm}.length()>4?new Boolean(true):new Boolean(false)

 

   JDK1.5?qing)以上的版本也可以这么写Q?/p>

 

            $F{xm}.length()>4 ?$F{xm}.length()>4?true:false

  5.在需要用的field或parameters的属性面板中讄其style为新建的style?/p>

 



]]>
有关ireport讄字段格式http://www.aygfsteel.com/codelife2010/archive/2010/11/18/338371.html老鼠׃?/dc:creator>老鼠׃?/author>Thu, 18 Nov 2010 06:02:00 GMThttp://www.aygfsteel.com/codelife2010/archive/2010/11/18/338371.htmlhttp://www.aygfsteel.com/codelife2010/comments/338371.htmlhttp://www.aygfsteel.com/codelife2010/archive/2010/11/18/338371.html#Feedback0http://www.aygfsteel.com/codelife2010/comments/commentRss/338371.htmlhttp://www.aygfsteel.com/codelife2010/services/trackbacks/338371.html

]]>
有关Ireport的分?/title><link>http://www.aygfsteel.com/codelife2010/archive/2010/11/18/338370.html</link><dc:creator>老鼠׃?/dc:creator><author>老鼠׃?/author><pubDate>Thu, 18 Nov 2010 05:59:00 GMT</pubDate><guid>http://www.aygfsteel.com/codelife2010/archive/2010/11/18/338370.html</guid><wfw:comment>http://www.aygfsteel.com/codelife2010/comments/338370.html</wfw:comment><comments>http://www.aygfsteel.com/codelife2010/archive/2010/11/18/338370.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.aygfsteel.com/codelife2010/comments/commentRss/338370.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/codelife2010/services/trackbacks/338370.html</trackback:ping><description><![CDATA[<p>1.Ҏ(gu)修改detail的高度,让其自适应?/p> <p>2.Ҏ(gu)分组来分(比较好实玎ͼQ分l时有在“新的一|开”q个选项</p> <p>3.定义一个自增的变量indexQ变量的表达式是“new Integer("1")”,计算cd?#8220;count”其他默认。添加一?#8220;Break”(分隔符)。修改它的属?#8220;print when expression”,表达式ؓ(f)“new Boolean($V{index}.intValue()%10==0)”。(q个Ҏ(gu)最后由其是在分l时Q?br /> </p> <p><br />  </p> <img src ="http://www.aygfsteel.com/codelife2010/aggbug/338370.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/codelife2010/" target="_blank">老鼠׃?/a> 2010-11-18 13:59 <a href="http://www.aygfsteel.com/codelife2010/archive/2010/11/18/338370.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>转蝲http://www.aygfsteel.com/codelife2010/archive/2010/11/16/338152.html老鼠׃?/dc:creator>老鼠׃?/author>Tue, 16 Nov 2010 01:42:00 GMThttp://www.aygfsteel.com/codelife2010/archive/2010/11/16/338152.htmlhttp://www.aygfsteel.com/codelife2010/comments/338152.htmlhttp://www.aygfsteel.com/codelife2010/archive/2010/11/16/338152.html#Feedback0http://www.aygfsteel.com/codelife2010/comments/commentRss/338152.htmlhttp://www.aygfsteel.com/codelife2010/services/trackbacks/338152.html

iReport & JasperReport配置?qing)用L(fng)明手?/a>

iReport & JasperReport配置?qing)用L(fng)明手? -

                                      

 

关于iReport和JasperReport的简明手?/p>

By Gem 伍子?/p>

1安装

1.1 iReport的安?/h2> iReport直接解压后,?font size="+0">J2SDK\lib目录下的tools.jar拯?font size="+0">iReport\lib目录下,然后?font size="+0">iReport目录下运?font size="+0">iReport.bat卛_?br /> 需要注意的?font size="+0">tools.jar的版本必要与本机安装的jre一_(d)也就是说Q如果系l安装的?font size="+0">jre1.4.2必ȝjdk1.4.2?font size="+0">tools.jar?br />

1.2 JapserReport开发(q行Q环境的搭徏

JasperReport的开发环境必要导入以下所有包Q?/p>

1Q?nbsp; JasperReport包,?font size="+0">jasperreports-0.6.1.jarQ?/p>

2Q?nbsp; Aparche Common包,包括logging?font size="+0">digester?font size="+0">beanutils?font size="+0">collections?font size="+0">logging-apiQ?/p>

3Q?nbsp; iText包,包括itext-1.1.jar?font size="+0">iTextAsian.jarQ用于输Z文字W到PDF文gQ?/p>

以上所有包Q除?font size="+0">iTextAsian.jarQ都已经包含?font size="+0">iReport\lib目录下?/p>

2 开发流E?/h1>

?font size="+0">iReport可视化编辑生成的文g?font size="+0">jrxml文档Q这是一U?font size="+0">xml文gQ记录了一?font size="+0">report的详l信息,我们可以直接用写字板打开它编辑,iReport是一个方便我们生成和~辑jrxml文g的工P它也可以很方便地?font size="+0">jrxml文g~译?font size="+0">jasper报表文g?/p>

jrxml文g通过Jasper~译之后变成了jasper文gQ这份文件才是真正在E序中调用生成报表的report文g?/p>

但是有一点要注意的是Q?font size="+0">jasper的各个版本编译出来的jasper文gq不兼容Q就是说?font size="+0">0.6.1版编译出来的文g?font size="+0">0.6.4版调用是?x)出错的Q?font size="+0">iReport自带?font size="+0">Jasper版本?font size="+0">0.6.1Q?font size="+0">jasper的最新版本是0.6.4。所以ؓ(f)了保持通用性,我徏议只?font size="+0">iReport来开发编?font size="+0">jrxml文gQ而不~译?font size="+0">jasper文gQ在我们的打印报表程序中再即时编译一ơ。虽然这h率可能会(x)低了一点,但是保证了不同版本的兼容性?/p>

在我们的E序中,要调?font size="+0">Jasper的话Q首先要得到一个数据库?font size="+0">ConnectionQŞ如:(x)Connection con = ...

需要往JasperReport传参数的话只需要新Z?font size="+0">MapQ以参数名作?font size="+0">keyQ需要传入的对象作ؓ(f)valueQ譬如:(x)

Map props = new HashMap();

      props.put("name", new String("name"));

需要多个参数只需分别putq?font size="+0">Map里去可以了?/p>

JasperReport有如下几个主要的ManagerQ?/p>
JasperCompileManager

?font size="+0">jrxml文g~译?font size="+0">jasper文g?font size="+0">JasperReport对象

JasperFillManager

从数据源中获取数据ƈ填充jasper文g?font size="+0">JasperReport对象Q?font size="+0">JasperPrint对象

JasperPrintManager

?font size="+0">JasperPrint对象直接输出到打印机打印

JasperExportManager

?font size="+0">JasperPrint对象导出?font size="+0">PDF?font size="+0">HTML文gQ或)

JasperRunManager

q行一?font size="+0">jasper文g?font size="+0">JasperReport对象q输出到PDF?font size="+0">Html文gQ或)中,我的理解是等于集成了JasperFillManager?strong>JasperExportManager的功?/p>

对于上述对象的详l说明请参阅JasperReport的文档?/p>

例程Q?/p> 例程Q?

public static void main(String[] args) {

    try {

      Class.forName("org.gjt.mm.mysql.Driver");

      Connection con = DriverManager.getConnection(

          "jdbc:mysql://wes:3306/umpdb?useUnicode=true&characterEncoding=GBK", "root", "elite");

      File f1 = new File("Account.jrxml");

      File f2 = new File("Contact.jrxml");

      JasperReport main = JasperCompileManager.compileReport(f1

          .getAbsolutePath());

      JasperReport report = JasperCompileManager.compileReport(f2

          .getAbsolutePath());

      Map props = new HashMap();

      props.put("subreport", report);

      JasperPrint print = JasperFillManager.fillReport(main, props,con);

      //JasperPrintManager.printReport(print,true);

      JasperExportManager.exportReportToPdfFile(print, "a.pdf");

      //JasperRunManager.runReportToPdfFile("Account.jasper", "a.pdf", props, con);

    } catch (ClassNotFoundException e) {

      // TODO 自动生成 catch ?/p>

      e.printStackTrace();

    } catch (SQLException e) {

      // TODO 自动生成 catch ?/p>

      e.printStackTrace();

    } catch (JRException e) {

      // TODO 自动生成 catch ?/p>

      e.printStackTrace();

    }

  }

3 注意事项

1Q?font size="+0">iReport中新Z文报表的时候记得要输入XML~码GB2312?/p>

2Q?font size="+0">iReport中定义中文字体的时候,要选择PDF Font Name?font size="+0">STSong-LightQ宋体)?font size="+0">MHei-MediumQ黑体)?font size="+0">MSung-LightQ在PDF Encoding中选择GB-UCS2-H(Chinese Simplified)Q否则输出到PDF时会(x)q?/p>

3Q用Report SQL查询之后Q可能会(x)出现某些字段没有自动建立FieldQ就需要在Field中手动定义了?/p>

posted on 2006-12-04 18:28 Tom 阅读(1169) 评论(0)  ~辑  收藏 所属分c? 报表工具 ?a href="http://www.aygfsteel.com/43880800/category/19348.html">Appfuse



]]>
վ֩ģ壺 ƽ| ַ| ͭϿ| ӳ| ʯ| | | ׯ| ͼ| Ҫ| ϲ| Ԫı| ˮ| ۷| ˳| | ƶ| | | | | | | ˳| Ӣ| | ³ƶ| | ζ| | ˮ| | | | ɽ| | | | ˶| | ¡|