﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-Java报表工具-随笔分类-Java报表—问题解析</title><link>http://www.blogjava.net/echoseason/category/30799.html</link><description>关注java报表工具 报表制作 </description><language>zh-cn</language><lastBuildDate>Mon, 25 May 2015 13:31:02 GMT</lastBuildDate><pubDate>Mon, 25 May 2015 13:31:02 GMT</pubDate><ttl>60</ttl><item><title>统计图表FineReport聚合报表</title><link>http://www.blogjava.net/echoseason/archive/2015/05/18/425136.html</link><dc:creator>season</dc:creator><author>season</author><pubDate>Mon, 18 May 2015 06:24:00 GMT</pubDate><guid>http://www.blogjava.net/echoseason/archive/2015/05/18/425136.html</guid><wfw:comment>http://www.blogjava.net/echoseason/comments/425136.html</wfw:comment><comments>http://www.blogjava.net/echoseason/archive/2015/05/18/425136.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/echoseason/comments/commentRss/425136.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/echoseason/services/trackbacks/425136.html</trackback:ping><description><![CDATA[<div><a href="http://www.finereport.com/knowledge/chart">统计图表</a>FineReport聚合报表<br /><a name="a:1." style="font-family: 微软雅黑; font-size: medium; line-height: 22px;"><div style="font-weight: bold; font-size: 16px; color: #383838; line-height: 11px; margin-top: 20px; margin-bottom: 16px;">1.&nbsp;问题描述</div></a><div style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;">使用嵌入式主子表制作模板，如果子报表比较大，不止一页，这时嵌入到主报表中只能显示部分（嵌入式的子报表只能在固定大小的区域中显示，不能自动扩展），怎么能显示其余页的数据呢？或者两个扩展的单元格怎样设置互补影响呢？这时就可以使用聚合报表来实现，如下图聚合报表实现效果：</div><div style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;"><img src="http://www.finereporthelp.com/help/9/3-1.gif" style="padding: 10px 0px 5px;"  alt="" /></div><a name="a:2." style="font-family: 微软雅黑; font-size: medium; line-height: 22px;"><div style="font-weight: bold; font-size: 16px; color: #383838; line-height: 11px; margin-top: 20px; margin-bottom: 16px;">2.&nbsp;示例</div></a><a name="a:2.1" style="font-family: 微软雅黑; font-size: medium; line-height: 22px;"><div style="font-weight: bold; font-size: 15px; color: #383838; margin-top: 11px; margin-bottom: 11px;">2.1&nbsp;聚合块自动扩展位置大小</div></a><div style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;">添加聚合模板，拖动数据表字段，设计表中样式等，模块大小不用固定可跟设计模板大小相同即可，如下图：</div><div style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;"><img src="http://www.finereporthelp.com/help/9/3-2.gif" style="padding: 10px 0px 5px;"  alt="" /></div><div style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;">预览模板聚合块自动扩展数据，超过一页大小，以分页的方式显示，如下图。</div><div style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;"><img src="http://www.finereporthelp.com/help/9/3-3.gif" style="padding: 10px 0px 5px;"  alt="" /></div><a name="a:2.2" style="font-family: 微软雅黑; font-size: medium; line-height: 22px;"><div style="font-weight: bold; font-size: 15px; color: #383838; margin-top: 11px; margin-bottom: 11px;">2.2&nbsp;聚合块扩展互不影响</div></a><div style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;">设置固定格式表头，不需要受到扩展数据的影响，这时就两个聚合块，一个设表头格式，另一个就是展示扩展数据，两个聚合块相互独立，如下图设置效果：</div><div style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;"><img src="http://www.finereporthelp.com/help/9/3-4.gif" style="padding: 10px 0px 5px;"  alt="" /></div><a name="a:2.3" style="font-family: 微软雅黑; font-size: medium; line-height: 22px;"><div style="font-weight: bold; font-size: 15px; color: #383838; margin-top: 11px; margin-bottom: 11px;">2.3&nbsp;数据分析预览聚合报表</div></a><div style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;">已完成模板可参照<span style="font-weight: bold; color: #8b008b;">%FR_HOME%\WebReport\WEB-INF\reportlets\doc\Advanced\polybook.cpt</span>。模板效果在线查看请点击polybook.cpt</div><div style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;">如果只希望内容在一页显示完全，则可以点击设计器右上角上面的数据分析预览，即预览模板时在后面加上参数<span style="font-weight: bold; color: #0000ff;">&amp;op=view</span>，则可看到文档中第一张图的效果。</div></div><img src ="http://www.blogjava.net/echoseason/aggbug/425136.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/echoseason/" target="_blank">season</a> 2015-05-18 14:24 <a href="http://www.blogjava.net/echoseason/archive/2015/05/18/425136.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>java报表开发FineReport Excel双向导入</title><link>http://www.blogjava.net/echoseason/archive/2015/05/12/425017.html</link><dc:creator>season</dc:creator><author>season</author><pubDate>Tue, 12 May 2015 05:59:00 GMT</pubDate><guid>http://www.blogjava.net/echoseason/archive/2015/05/12/425017.html</guid><wfw:comment>http://www.blogjava.net/echoseason/comments/425017.html</wfw:comment><comments>http://www.blogjava.net/echoseason/archive/2015/05/12/425017.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/echoseason/comments/commentRss/425017.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/echoseason/services/trackbacks/425017.html</trackback:ping><description><![CDATA[<div><strong style="font-size: 14pt;"><a href="http://www.finereport.com/">java报表开发</a>FineReport Excel双向导入<br /></strong><a name="a:1." style="font-family: 微软雅黑; font-size: medium; line-height: 22px;"><div class="doc_h1" style="font-weight: bold; font-size: 16px; color: #383838; line-height: 11px; margin-top: 20px; margin-bottom: 16px;">1.&nbsp;描述</div></a><div class="doc_description" style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;">Excel双向导入是指标题行列是从单元格扩展得到的，并将导入数据的单元格也是可扩展的，如下图所示效果，标题字段通过横向扩展得到，导入数据的单元格纵向扩展，导入不定行数据：</div><div class="doc_description" style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;"><img src="http://www.finereporthelp.com/help/13/29/1/3-1.png" style="padding: 10px 0px 5px;"  alt="" /></div><div class="doc_description" style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;">Excel双向导入模板在web端填报预览打开之后，其展示效果与固定标题行导入不定行是一样的，那么双向导入的逻辑仍然是首先根据标题匹配，如果标题匹配不上或者只有一个可以匹配上或者设置了不执行根据标题匹配，则执行根据位置匹配。</div><a name="a:2." style="font-family: 微软雅黑; font-size: medium; line-height: 22px;"><div class="doc_h1" style="font-weight: bold; font-size: 16px; color: #383838; line-height: 11px; margin-top: 20px; margin-bottom: 16px;">2.&nbsp;示例</div></a><a name="a:2.1" style="font-family: 微软雅黑; font-size: medium; line-height: 22px;"><div class="doc_h2" style="font-weight: bold; font-size: 15px; color: #383838; margin-top: 11px; margin-bottom: 11px;">2.1&nbsp;模板准备</div></a><div class="doc_description" style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;">新建一个模板，添加<span class="doc_navigation" style="font-weight: bold; color: #008080;">内置数据集</span>，该数据集中只有一列数据，存储的是<span class="doc_formula" style="font-weight: bold; color: #0000ff;">产品表</span>中的字段名称，如下图：</div><div class="doc_description" style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;"><img src="http://www.finereporthelp.com/help/13/29/1/3-2.png" style="padding: 10px 0px 5px;"  alt="" /></div><div class="doc_description" style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;">内置数据集准备好之后，将<span class="doc_formula" style="font-weight: bold; color: #0000ff;">字段名称</span>数据列拖曳到A2单元格中，设置为横向扩展，并将A3单元格设置为纵向扩展，如下图：</div><div class="doc_description" style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;"><img src="http://www.finereporthelp.com/help/13/29/1/3-3.png" style="padding: 10px 0px 5px;"  alt="" /></div><a name="a:2.2" style="font-family: 微软雅黑; font-size: medium; line-height: 22px;"><div class="doc_h2" style="font-weight: bold; font-size: 15px; color: #383838; margin-top: 11px; margin-bottom: 11px;">2.2&nbsp;工具栏设置</div></a><div class="doc_description" style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;">默认填报工具栏是没有导入Excel按钮的，点击<span class="doc_navigation" style="font-weight: bold; color: #008080;">模板&gt;模板web属性&gt;填报页面设置</span>，<span class="doc_navigation" style="font-weight: bold; color: #008080;">为该模板单独设置</span>，勾选<span class="doc_navigation" style="font-weight: bold; color: #008080;">使用工具栏</span>，为该报表单独设置工具栏，清空工具栏，然后在按钮面板中双击<span class="doc_navigation" style="font-weight: bold; color: #008080;">提交</span>按钮和<span class="doc_navigation" style="font-weight: bold; color: #008080;">导入excel</span>按钮，将这两个按钮添加到顶部工具栏中，与<span class="doc_formula" style="font-weight: bold; color: #0000ff;">根据位置匹配示例</span>中的设置相同。</div><a name="a:2.3" style="font-family: 微软雅黑; font-size: medium; line-height: 22px;"><div class="doc_h2" style="font-weight: bold; font-size: 15px; color: #383838; margin-top: 11px; margin-bottom: 11px;">2.3&nbsp;配置文件修改</div></a><div class="doc_description" style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;">FineReport默认不开启双向导入，故，如果要使用双向导入，首先要先修改配置文件，使其开启双向导入。</div><div class="doc_description" style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;">打开<span class="doc_dir" style="font-weight: bold; color: #8b008b;">%FR_HOME%\WebReport\WEB-INF\resources</span>下面的<span class="doc_formula" style="font-weight: bold; color: #0000ff;">customconfig.xml</span>文件，如果没有该文件，则复制<span class="doc_formula" style="font-weight: bold; color: #0000ff;">config.xml</span>至该文件夹中，并重命名为<span class="doc_formula" style="font-weight: bold; color: #0000ff;">customconfig.xml</span>，如下图：</div><div class="doc_description" style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;"><img src="http://www.finereporthelp.com/help/13/29/1/3-4.png" style="padding: 10px 0px 5px;"  alt="" /></div><div class="doc_description" style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;">在<span class="doc_formula" style="font-weight: bold; color: #0000ff;">customconfig.xml</span>文件最后面的<span class="doc_formula" style="font-weight: bold; color: #0000ff;">&lt;/ReportServerParameter&gt;</span>标签之前插入<span class="doc_formula" style="font-weight: bold; color: #0000ff;">&lt;ImportDoubleDir doubledir = "true"/&gt;</span>，表示开启双向导入，如下图：</div><div class="doc_description" style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;"><img src="http://www.finereporthelp.com/help/13/29/1/3-5.png" style="padding: 10px 0px 5px;"  alt="" /></div><a name="a:2.4" style="font-family: 微软雅黑; font-size: medium; line-height: 22px;"><div class="doc_h2" style="font-weight: bold; font-size: 15px; color: #383838; margin-top: 11px; margin-bottom: 11px;">2.4&nbsp;Excel导入</div></a><div class="doc_description" style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;">点击<span class="doc_navigation" style="font-weight: bold; color: #008080;">填报预览</span>按钮，在web端预览报表，可以看到标题字段是扩展出来的，点击工具栏上的<span class="doc_navigation" style="font-weight: bold; color: #008080;">导入Excel</span>按钮，选择excelimport.xls，可以看到如下图所示效果：</div><div class="doc_description" style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;"><img src="http://www.finereporthelp.com/help/13/29/1/3-6.gif" style="padding: 10px 0px 5px;"  alt="" /></div><div class="doc_description" style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;">已完成模板请参照<span class="doc_dir" style="font-weight: bold; color: #8b008b;">%FR_HOME%\WebReport\WEB-INF\reportlets\doc\SpecialSubject|\ExcelImport\ExcelImport_5.cpt。</span></div><strong style="font-size: 14pt;"><br /></strong></div><img src ="http://www.blogjava.net/echoseason/aggbug/425017.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/echoseason/" target="_blank">season</a> 2015-05-12 13:59 <a href="http://www.blogjava.net/echoseason/archive/2015/05/12/425017.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>统计图表FineReport之SQL函数</title><link>http://www.blogjava.net/echoseason/archive/2015/05/11/424996.html</link><dc:creator>season</dc:creator><author>season</author><pubDate>Mon, 11 May 2015 09:17:00 GMT</pubDate><guid>http://www.blogjava.net/echoseason/archive/2015/05/11/424996.html</guid><wfw:comment>http://www.blogjava.net/echoseason/comments/424996.html</wfw:comment><comments>http://www.blogjava.net/echoseason/archive/2015/05/11/424996.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/echoseason/comments/commentRss/424996.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/echoseason/services/trackbacks/424996.html</trackback:ping><description><![CDATA[<span style="font-size: 12px;"><strong><a href="http://www.finereport.com/knowledge/chart">统计图表</a>FineReport之SQL函数</strong><br /><br /></span><div style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;">有的时候希望某个单元格能够直接获取到数据库中的某个值，而不是先要定义一个数据集后，再去取数据。这时就可以用函数Sql()公式，下面讲解下其用法。</div><a name="a:1." style="font-family: 微软雅黑; font-size: medium; line-height: 22px;"><div style="font-weight: bold; font-size: 16px; color: #383838; line-height: 11px; margin-top: 20px; margin-bottom: 16px;">1.&nbsp;公式解释</div></a><div style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;">SQL(connectionName,sql,columnIndex,rowIndex)：返回的数据是从connectionName数据库中获取的sql语句的表中的第columnIndex列第rowIndex行所对应的元素。</div><div style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;">connectionName：数据库名，字符串形式，需要用引号如"FRDemo"；</div><div style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;">sql：SQL语句，字符串形式；</div><div style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;">columnIndex：列序号，整型；</div><div style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;">rowIndex：行序号，整型。</div><div style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;"><span style="color: red;">备注：行序号可以不写，这样返回值为数据列。</span></div><a name="a:2." style="font-family: 微软雅黑; font-size: medium; line-height: 22px;"><div style="font-weight: bold; font-size: 16px; color: #383838; line-height: 11px; margin-top: 20px; margin-bottom: 16px;">2.&nbsp;以我们提供的数据源FRDemo为例</div></a><a name="a:2.1" style="font-family: 微软雅黑; font-size: medium; line-height: 22px;"><div style="font-weight: bold; font-size: 15px; color: #383838; margin-top: 11px; margin-bottom: 11px;">2.1&nbsp;示例（就一般的只获取某个字段内容）</div></a><div style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;">从表 STSCORE中，我们可看到第3行第3列的值为Alex，如下：</div><div style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;"><img src="http://www.finereporthelp.com/help/13/31/1/1-1.png" style="padding: 10px 0px 5px;"  alt="" /></div><div style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;">现在若要直接在报表的单元格中显示数据值：Alex，而不通过先定义一个数据集后，再去取数据的方式，这里就可以使用sql()公式，此时只需在单元格中输入：<span style="font-weight: bold; color: #5f9ea0;">=sql("FRDemo","SELECT * FROM STSCORE",3,3)</span>即可，预览就可看到Alex值。</div><a name="a:2.2" style="font-family: 微软雅黑; font-size: medium; line-height: 22px;"><div style="font-weight: bold; font-size: 15px; color: #383838; margin-top: 11px; margin-bottom: 11px;">2.2&nbsp;示例（带有参数时公式的使用）</div></a><div style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;">带有参数形式的时候，直接在报表的单元格中获取数据值，写法如下：</div><div style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;"><span style="font-weight: bold; color: #5f9ea0;">=sql("FRDemo","SELECT * FROM STSCORE where CLASSNO = 'Class1' ",3)</span></div><div style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;">显示效果（班级为Class1的第3列所有值），如下：</div><div style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;"><img src="http://www.finereporthelp.com/help/13/31/1/1-2.png" style="padding: 10px 0px 5px;"  alt="" /></div><div style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;">若需要显示某个具体值，如：显示 Jonny 的效果（即班级为Class1的第3列第4行的值），写法如下：</div><div style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;"><span style="font-weight: bold; color: #5f9ea0;">=sql("FRDemo","SELECT * FROM STSCORE where CLASSNO = 'Class1' ",3,4)</span></div><div style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;">若参数值为变量如为报表参数或者是某个单元格，则写法如下：</div><div style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;"><span style="font-weight: bold; color: #5f9ea0;">=sql("FRDemo","SELECT * FROM STSCORE where CLASSNO = '"+$class+"' ",3,4)</span></div><div style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;">或</div><div style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;"><span style="font-weight: bold; color: #5f9ea0;">=sql("FRDemo","SELECT * FROM STSCORE where CLASSNO = '"+A1+"' ",3,4)</span></div><div style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;"><span style="color: red;">如果传递的参数是获取当前单元格的值，即用$$$作为参数时，字符串类型同样需要拼接单引号，如下：</span></div><div style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;"><span style="font-weight: bold; color: #5f9ea0;">=sql("FRDemo","SELECT * FROM STSCORE where CLASSNO = '"+$$$+"' ",3,4)</span></div><div style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;"><span style="color: red;">注：如果参数或者单元格值有多个，那么sql函数的写法如下：</span></div><div style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;"><span style="font-weight: bold; color: #5f9ea0;">=sql("FRDemo","SELECT * FROM STSCORE where CLASSNO in ('"+$class+"') ",3,4)</span></div><div style="color: #383838; text-indent: 22px; text-align: justify; margin-top: 5px; margin-bottom: 5px; font-family: 微软雅黑; line-height: 22px;">并且class参数返回值的分隔符需为','，具体请查看下拉复选框参数联动。</div><img src ="http://www.blogjava.net/echoseason/aggbug/424996.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/echoseason/" target="_blank">season</a> 2015-05-11 17:17 <a href="http://www.blogjava.net/echoseason/archive/2015/05/11/424996.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Finereport常见问题&amp;紧急处理方案</title><link>http://www.blogjava.net/echoseason/archive/2012/11/15/391370.html</link><dc:creator>season</dc:creator><author>season</author><pubDate>Thu, 15 Nov 2012 03:39:00 GMT</pubDate><guid>http://www.blogjava.net/echoseason/archive/2012/11/15/391370.html</guid><wfw:comment>http://www.blogjava.net/echoseason/comments/391370.html</wfw:comment><comments>http://www.blogjava.net/echoseason/archive/2012/11/15/391370.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/echoseason/comments/commentRss/391370.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/echoseason/services/trackbacks/391370.html</trackback:ping><description><![CDATA[<div><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: 宋体; ">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">出现问题先搜一下文档上有没有，再看看度娘有没有，再看看论坛有没有。有报错要看日志（6.5的日志在设计器的菜单栏有窗口视图日志）。下面简单罗列下常见的问题，大多文档上都有提到的。</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">address&nbsp;pool&nbsp;is&nbsp;full：</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">地址池满，连接数超过并发数上限。</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">文档</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">使用了未注册的功能：</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">未注册的版本是可以试用所有功能的。注册的lic是勾选过功能点的，如果制作的模板使用了未注册的功能就会报这个错误。一般容易分辨，有的客户可能禁掉报错界面，这样测试是好的，一放到服务器上就出不来，没有报错界面就不太容易发现了。</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">文档</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">提示注册：</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">注册常见问题处理方法：http://www.finereporthelp.com/help/9/4.html</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">文档</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">session&nbsp;timed&nbsp;out：</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">session超时。</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">文档</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">没有返回数据集：</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">在存储过程中的操作语句之前加上set&nbsp;nocount&nbsp;on&nbsp;或者在数据集exec调用存储过程的前面加上这句。</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">当SET&nbsp;NOCOUNT&nbsp;为&nbsp;ON&nbsp;时，不返回计数（表示受&nbsp;Transact-SQL&nbsp;语句影响的行数）。当&nbsp;SET&nbsp;NOCOUNT&nbsp;为&nbsp;OFF&nbsp;时，返回计数。</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">如果存储过程中包含的一些语句并不返回许多实际的数据，则该设置由于大量减少了网络流量，因此可显著提高性能。</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">文档</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">模板文件损坏，或者打开模板没有反应：</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">FR的cpt模板由设计器做出源文件是一组组的标签括起来的语句。像HTML的结构那样，可以用文本编辑器打开。有些客户的模板可能做的比较BT，或者高低版本乱捣鼓，或者正操作着出现什么DT的情况导致模板不完整。一般报错会告诉出错的位置。655版本可以用bak文件还原下，7.0就不太好办，可以尝试填补部分语句主要是标签来抢救部分模板。</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">找不到模板：</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">找不到模板可能的原因看看是不是URL的问题，直接在模板中写中文的话，有些浏览器是会自动转码的（记得chrome、搜狗好像是），有些不会，比如IE。</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">文档</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">java&nbsp;heap&nbsp;space、stack&nbsp;overflow：</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">这个问度娘。常见的原因是模板做的很复杂，用了上百字段，上百行的sql语句，各种嵌套，尤其要注意有没有死循环。也有可能是服务器端的问题，比如tomcat最大内存太小了用了默认的64M。</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">数据集定义中有下拉复选框参数出问题：</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">下拉复选框控件返回值默认情况下是数组，参数取到的字符串是不带引号的（所以在数据集定义的sql语句中调用字符串类型的参数的话要手动加上单引号才行）。多个值用in，sql的in语句参数是字符串数组，每个都要求带单引号。所以要转化下，把控件的返回值改成字符串，间隔符用','。</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">文档</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">本地预览的效果和服务器上的效果不一样：</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">首先检查jar包等是不是有问题。也有可能是嵌入平台后出现的问题。</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">文档</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">平台管理忘了密码或者登不进：</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">报表平台管理只有一个账号，用户名和密码放在web-inf/resources/privilege.xml中。655密码没加密，7.0密码是加密的，密码在&lt;rootManagerPassword&gt;标签中，把里面改成&lt;![CDATA[___0022]]&gt;密码就是一个1.用这个密码登进去再重新设置。</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">图表中文乱码（方框）：</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">这个Linux环境下装了oracle后容易出现这样的情况，方框是缺少中文字体的缘故（常见英文字体各种环境应该都有的）。安装对应的中文字体即可解决。</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">大块头的数据库搞坏字体环境并不少见，上次在win7里面装domino，好多软件的字体都被搞了，重装了系统的中文字体重启了计算机才恢复正常。</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">数据集预览的时候中文乱码（全问号）：</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">乱码有几种情况：一种是方框，这个是字体的原因，画不出来汉字。一种是问号，这个是编码的问题，比如mysql数据库默认的编码是latin1，库里面没有中文对应的编码，就解析不了中文，解决方法是改变编码，比如把mysql的编码改成utf8或者gbk。这里要注意下的是，数据库有服务器编码，客户端编码，具体的某一个数据库和具体的表也有编码，只有在建数据库建表的时候选对了编码才行（没选的话就用的默认的）。</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">repeated&nbsp;column&nbsp;width&nbsp;is&nbsp;larger&nbsp;than&nbsp;paper&nbsp;width：</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">这个看这段话应该是很好理解的。比如做的模板页面宽度只能放开5列，结果给6列做了重复和冻结，这个逻辑上肯定是说不过去的。</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">文档</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">模板打不开，拒绝访问：</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">可能是win7操作系统对文件有权限。</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">安装设计器后无法预览报表（404报错）：</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">文档</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">对象不支持此属性或者方法、XXX未定义：</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">文档</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">THREE未定义:</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">自己没碰到过没解决过。</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">日期比较导致出错：</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">我测试用的是自己搭的sqlserver2005.2012/01/01这种格式的日期和FR上的2012-01-01这种格式的是不能比较的，直接从数据库中读取的日期格式都比较长，不光是年月日，而且读不出来，不知道是为什么，预览时可以看到的。然后我加了个在条件属性中加了个left(todate($$$),10)转化了一下就解决了，todate转化成了-连接，前10是年月日。</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">由一个单元格扩展出来的行高不一致（填报预览）：</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">但是分页预览却是没有问题的。最后发现时因为设置了数据字典。设置了数据字典的单元格其真实值一行显示不了的，就换行了，所以变宽了。难道是填报预览时计算需要空间的时候用的是真实值计算的？解决方法，注意点，拉宽点就好了。</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">使用程序数据集出错：</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">654和655都有个问题是加载了有问题的class文件作为程序数据集，下次就打不开了，655是设计面板单元格界面没有了。7.0版本没这个问题。</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">程序数据集class文件必须放在class&nbsp;com&nbsp;fr&nbsp;data目录下。&nbsp;编译好了后的class名也是不能修改的。</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">自定义数据字典显示等号问题：</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">FR的像自定义数据字典这种地方，跟单元格还有提示定义框一定，如果不是&#8216;=&#8217;号开头是当做字符串处理，&#8216;=&#8217;号开头当做公式处理。所以单写一个等号就是空白的。显示等号的话用="="</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">一个单元格内容过多报错：</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:18.7500pt; background:#ffffff; "><span style="font-size: 10.5pt; font-family: Tahoma; ">临时解决方法，直接合并多个单元格可以增加输入内容。</span></p><p style="margin-bottom:0pt; margin-top:0pt; "></p></div><img src ="http://www.blogjava.net/echoseason/aggbug/391370.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/echoseason/" target="_blank">season</a> 2012-11-15 11:39 <a href="http://www.blogjava.net/echoseason/archive/2012/11/15/391370.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>java报表工具中Oracle数据库厉行计划详解</title><link>http://www.blogjava.net/echoseason/archive/2012/08/23/386158.html</link><dc:creator>season</dc:creator><author>season</author><pubDate>Thu, 23 Aug 2012 15:31:00 GMT</pubDate><guid>http://www.blogjava.net/echoseason/archive/2012/08/23/386158.html</guid><wfw:comment>http://www.blogjava.net/echoseason/comments/386158.html</wfw:comment><comments>http://www.blogjava.net/echoseason/archive/2012/08/23/386158.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/echoseason/comments/commentRss/386158.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/echoseason/services/trackbacks/386158.html</trackback:ping><description><![CDATA[<div><p style="text-align: center;margin-bottom: 0pt; margin-top: 0pt; background-color: #ffffff; background-position: initial initial; background-repeat: initial initial; "><span style="font-size: 10.5pt; line-height: 15.75pt; text-align: left; ">&nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #333333; font-family: Tahoma; font-size: 10.5pt; line-height: 15.75pt; text-align: left; ">Oracle数据库厉行计划的相关知识是本文我们主要要介绍的内容，我们首先介绍了厉行计划的概念，然后给出了两个厉行计划的实例进行说明，最后介绍了Oracle优化器的形式以及厉行计划对我们的用途，接下来就让我们一起来了解一下这部分内容。</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:15.7500pt; "><span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'Tahoma'; "><br /></span><span style="mso-spacerun:'yes'; color:#333333; font-weight:bold; font-size:12.0000pt; font-family:'宋体'; background:#ffffff; ">Q：</span><span style="mso-spacerun:'yes'; color:#333333; font-weight:bold; font-size:12.0000pt; font-family:'Tahoma'; background:#ffffff; ">什么是厉行计划</span><span style="mso-spacerun:'yes'; color:#333333; font-weight:bold; font-size:12.0000pt; font-family:'Tahoma'; "><br /></span><span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'Tahoma'; "><br /></span><span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;所谓厉行计划，望文生义，即便对一个查询任务，做出一份怎样去告终任务的翔实计划。举个生存中的例子，我从珠海要去英国，我能够抉择先去香港然后起色，也能够先去北京起色，可能去广州也能够。然而究竟怎样去英国划算，也即便我的开支起码，这是一件划算考究的事情。同样对于查询而言，我们提交的SQL仅仅是描写出了我们的目标地是英国，但至于怎么去，等闲我们的SQL中是未曾给出提醒消息的，是由数据库来定夺的。</span><span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'Tahoma'; "><br /></span><span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'Tahoma'; "><br /></span><span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;我们先容易的看一个厉行计划的比拟：SQL&gt;&nbsp;set&nbsp;autotrace&nbsp;traceonly</span><span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'Tahoma'; "><br /></span><span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'Tahoma'; "><br /></span><span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">厉行计划一：</span></p><p style="margin-left:34.5000pt; margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:15.7500pt; "><span style="mso-spacerun:'yes'; color:#666666; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">SQL&gt;&nbsp;select&nbsp;count(*)&nbsp;from&nbsp;t;</span></p><p style="margin-left:34.5000pt; margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:15.7500pt; "><span style="mso-spacerun:'yes'; color:#666666; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">COUNT(*)</span></p><p style="margin-left:34.5000pt; margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:15.7500pt; "><span style="mso-spacerun:'yes'; color:#666666; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">----------</span></p><p style="margin-left:34.5000pt; margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:15.7500pt; "><span style="mso-spacerun:'yes'; color:#666666; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">24815</span></p><p style="margin-left:34.5000pt; margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:15.7500pt; "><span style="mso-spacerun:'yes'; color:#666666; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">Execution&nbsp;Plan</span></p><p style="margin-left:34.5000pt; margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:15.7500pt; "><span style="mso-spacerun:'yes'; color:#666666; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">0　SELECT&nbsp;STATEMENT&nbsp;Optimizer=CHOOSE</span></p><p style="margin-left:34.5000pt; margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:15.7500pt; "><span style="mso-spacerun:'yes'; color:#666666; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">10　&nbsp;SORT&nbsp;(AGGREGATE)</span></p><p style="margin-left:34.5000pt; margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:15.7500pt; "><span style="mso-spacerun:'yes'; color:#666666; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">21&nbsp;TABLE&nbsp;Access&nbsp;(FULL)&nbsp;OF&nbsp;'T'</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:15.7500pt; "></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:15.7500pt; "><span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">厉行计划二：</span></p><p style="margin-left:34.5000pt; margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:15.7500pt; "><span style="mso-spacerun:'yes'; color:#666666; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">SQL&gt;&nbsp;select&nbsp;count(*)&nbsp;from&nbsp;t;</span></p><p style="margin-left:34.5000pt; margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:15.7500pt; "><span style="mso-spacerun:'yes'; color:#666666; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">COUNT(*)</span></p><p style="margin-left:34.5000pt; margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:15.7500pt; "><span style="mso-spacerun:'yes'; color:#666666; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">24815</span></p><p style="margin-left:34.5000pt; margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:15.7500pt; "><span style="mso-spacerun:'yes'; color:#666666; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">Execution&nbsp;Plan</span></p><p style="margin-left:34.5000pt; margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:15.7500pt; "><span style="mso-spacerun:'yes'; color:#666666; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">0　SELECT&nbsp;STATEMENT&nbsp;Optimizer=CHOOSE&nbsp;(Cost=26&nbsp;Card=1)</span></p><p style="margin-left:34.5000pt; margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:15.7500pt; "><span style="mso-spacerun:'yes'; color:#666666; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">10　&nbsp;SORT&nbsp;(AGGREGATE)</span></p><p style="margin-left:34.5000pt; margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:15.7500pt; "><span style="mso-spacerun:'yes'; color:#666666; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">21&nbsp;INDEX&nbsp;(FULL&nbsp;SCAN)&nbsp;OF&nbsp;'T_INDEX'&nbsp;(NON-UNIQUE)(Cost=26&nbsp;Card=28180)</span></p><p style="margin-left:34.5000pt; margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:15.7500pt; "></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:15.7500pt; "><span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">这两个厉行计划中，第一个表示求和是穿越举行全表扫描来做的，把全副表中数据读入内存来逐条累加;第二个表示依据表中索引，把全副索引读进内存来逐条累加，而无须去读表中的数据。然而这两种措施究竟哪种快呢?等闲来说可能二比一快，但也不是绝对的。这是一个很容易的例子演示厉行计划的差异。对于混杂的SQL(表连接、嵌套子查询等)，厉行计划可能几十种甚至上百种，然而究竟那种良好呢?我们事前并不懂得，数据库本身也不懂得，然而数据库会依据定然的法定可能普查消息(statistics)去抉择一个厉行计划，等闲来说抉择的是比拟优的，但也有抉择失手的时候，这即便这次谈论的价值所在。</span><span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'Tahoma'; "><br /></span><span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'Tahoma'; "><br /></span><span style="mso-spacerun:'yes'; color:#333333; font-weight:bold; font-size:12.0000pt; font-family:'宋体'; background:#ffffff; ">Q：</span><span style="mso-spacerun:'yes'; color:#333333; font-weight:bold; font-size:12.0000pt; font-family:'Tahoma'; background:#ffffff; ">Oracle优化器形式</span><span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'Tahoma'; "><br /></span><span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'Tahoma'; "><br /></span><span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Oracle优化器有两大类，基于法定的和基于代价的，在SQLPLUS中我们能够察看init文件中定义的缺省的优化器形式。</span></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:15.7500pt; "></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:15.7500pt; "><span style="mso-spacerun:'yes'; color:#666666; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">SQL&gt;&nbsp;show&nbsp;parameters&nbsp;optimizer_mode</span>&nbsp;<span style="mso-spacerun:'yes'; color:#666666; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">NAME&nbsp;TYPEVALUE</span>&nbsp;<span style="mso-spacerun:'yes'; color:#666666; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">optimizer_mode&nbsp;string　&nbsp;CHOOSE</span><span style="mso-spacerun:'yes'; color:#666666; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">&nbsp;&nbsp;</span><span style="mso-spacerun:'yes'; color:#666666; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">SQL&gt;</span></p><p style="margin-left:34.5000pt; margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:15.7500pt; "></p><p style="margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:15.7500pt; "><span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">这是Oracle8.1.7&nbsp;企业版，我们能够看出，默认安装后数据库优化器形式为CHOOSE,我们还能够设置为&nbsp;RULE、FIRST_ROWS,ALL_ROWS。能够在init文件中对全副instance的所有会话设置，也能够独自对某个会话设置：</span></p><p style="margin-left:34.5000pt; margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:15.7500pt; "><span style="mso-spacerun:'yes'; color:#666666; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">SQL&gt;&nbsp;ALTER&nbsp;SESSION&nbsp;SET&nbsp;optimizer_mode　=&nbsp;RULE;</span></p><p style="margin-left:34.5000pt; margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:15.7500pt; "><span style="mso-spacerun:'yes'; color:#666666; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">会话已改动。</span></p><p style="margin-left:34.5000pt; margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:15.7500pt; "><span style="mso-spacerun:'yes'; color:#666666; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">SQL&gt;　ALTER&nbsp;SESSION&nbsp;SET&nbsp;optimizer_mode　=&nbsp;FIRST_ROWS;</span></p><p style="margin-left:34.5000pt; margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:15.7500pt; "><span style="mso-spacerun:'yes'; color:#666666; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">会话已改动。</span></p><p style="margin-left:34.5000pt; margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:15.7500pt; "><span style="mso-spacerun:'yes'; color:#666666; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">SQL&gt;　ALTER&nbsp;SESSION&nbsp;SET&nbsp;optimizer_mode　=&nbsp;ALL_ROWS;</span></p><p style="margin-left:34.5000pt; margin-bottom:0pt; margin-top:0pt; text-align:left; line-height:15.7500pt; "><span style="mso-spacerun:'yes'; color:#666666; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">会话已改动。</span></p><p style="margin-bottom:0pt; margin-top:0pt; "></p><p style="text-indent:28.3500pt; margin-bottom:0pt; margin-top:0pt; "><span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">基于法定的查询，数据库依据表和索引等定义消息，按照定然的法定来发生厉行计划;基于代价的查询，数据库依据搜集的表和索引的数据的普查消息(穿越analyze&nbsp;号召可能利用dbms_stats包来搜集)归纳来定夺拨取一个数据库感受最优的厉行计划(切实上无须定最优)。RULE是基于法定的，CHOOSE表示万一查询的表存在搜集的普查消息则基于代价来厉行(在CHOOSE形式下Oracle批准的是&nbsp;FIRST_ROWS)，否则基于法定来厉行。在基于代价的两种措施中，FIRST_ROWS指厉行计划批准起码资源尽快的归来局部收获给客户端，对于排序分页页揭示这种查询尤其实用，ALL_ROWS指以大局花费资源起码的措施归来收获给客户端。</span><span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'Tahoma'; "><br /></span><span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'Tahoma'; "><br /></span><span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;基于法定的形式下，数据库的厉行计划等闲比拟安宁。但在基于代价的形式下，我们才有更大的时机抉择最优的厉行计划。也由于Oracle的许多查询方面的个性定然在基于代价的形式下能力揭示出来，因而我们等闲不抉择RULE(并且Oracle号称从&nbsp;Oracle&nbsp;10i版本数据库开始将不再扶持&nbsp;RULE)。既然是基于代价的形式，也即便说厉行计划的抉择是依据表、索引等定义和数据的普查消息来定夺的，这个普查消息是依据&nbsp;analyze&nbsp;号召可能dbms_stats包来定期搜集的。率先存在着一种可能，即便由于搜集消息是一个很花费资源和工夫的动作，尤其当表数据量很大的时候，因为搜集消息是对全副表数据举行重新的全面普查，因而这是我们定然端庄琢磨的问题。我们只能在服务器安逸的时候定期的举行消息搜集。这解释我们在一段日期内，普查消息可能和数据库本身的数据并不合乎;另外即便Oracle的普查数据本身也存在着不准确局部(翔实参看Oracle&nbsp;DOCUMENT)，更重要的一个问题即便及时普查数据相对曾经比拟准确，然而Oracle的优化器的抉择也并不是始终是最优的计划。这也攀附于Oracle对不同厉行计划的代价的计算法定(我们等闲是无法懂得翔实的计算法定的)。这好像我们定夺从香港还是从北京去英国，车票、机票等切实价格究竟是怎么核算出来的我们并不懂得，可能说我们目前打听的价格消息，在我们乘车前往的时候，恳挚价格跟我们的核算曾经发生了改变。所有的因素，都将波及我们的全副开支。</span><span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'Tahoma'; "><br /></span><span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'Tahoma'; "><br /></span><span style="mso-spacerun:'yes'; color:#333333; font-weight:bold; font-size:12.0000pt; font-family:'宋体'; background:#ffffff; ">Q：</span><span style="mso-spacerun:'yes'; color:#333333; font-weight:bold; font-size:12.0000pt; font-family:'Tahoma'; background:#ffffff; ">厉行计划安宁功能带给我们什么</span><span style="mso-spacerun:'yes'; color:#333333; font-weight:bold; font-size:12.0000pt; font-family:'Tahoma'; "><br /></span><span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'Tahoma'; "><br /></span><span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Oracle存在着厉行计划抉择失手的可能。这也是我们经常碰见的一些假象，例如总有人说我的过程在测验数据库中跑的很好，但在产品数据库上即便跑的很差，甚至后者硬件条件比前者还好，这究竟是为什么?硬件资源、普查消息、参数设置都可能对厉行计划发生波及。由于因素太多，我们总是对未来怀着一种莫名的生怕，我的产品数据库上线后究竟跑的好不好?于是Oracle供给了一种安宁厉行计划的力气，也即便把在测验环境中的运行良好的厉行计划所发生的OUTLINES移植到产品数据库，使得厉行计划不会随着其他因素的改变而改变。</span><span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'Tahoma'; "><br /></span><span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'Tahoma'; "><br /></span><span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">那么OUTLINES是什么呢?先要推荐一个内容，Oracle供给了在SQL中利用HINTS来领导优化器发生我们想要的厉行计划的力气。这在多表连接、混杂查询中尤其管用。HINTS的种类许多，能够设置优化器目标(RULE、CHOOSE、FIRST_ROWS、ALL_ROWS)，能够指定表连接的次序，能够指定利用哪个表的哪个索引等等，能够对SQL举行许多精细的扼制。穿越这种措施发生我们想要的厉行计划的这些HINTS,Oracle能够存储这些HINTS，我们称之为OUTLINES。穿越STORE&nbsp;OUTLINES能够使得我们具有尔后发生雷同厉行计划的力气，也即便使我们具有了安宁厉行计划的力气。</span><span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'Tahoma'; "><br /></span><span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'Tahoma'; "><br /></span><span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;这里想给出一个附带的解释即便，切实上，我们穿越工具修改SQL，例如利用SQL　EXPERT修改后的SQL，这些不但仅是加了HINTS而且文本都曾经发生了改变的SQL，也能够存储OUTLINES，并可被利用到利用中。但这不是定然见效，我们定然测验察看是否见效。但由于就算给了讹谬的OUTLINES,数据库在厉行的时候，揖　智疏忽过去重新生成厉行计划而不会归来讹谬，因而我们才敢塌心的这么利用。当然在Oracle文档中并未曾指明能够这么做，文档中只是解释，万一存在OUTLINES的同时又在SQL中加了HINTS，则会利用OUTLINES而疏忽HINTS。这秉功能在LECCO将公布的产品中会利用这一功能，这么能够将SQL&nbsp;EXPERT的修改SQL的力气和安宁厉行计划的力气联合起来，那么我们就对不能改动源代码的利用具有了相当壮大的SQL优化力气。</span><span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'Tahoma'; "><br /></span><span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'Tahoma'; "><br /></span><span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;可能我们会有疑问，假定安宁了厉行计划，那还搜集普查消息干吗?这是因为几个起因构成的，率先，目前的厉行计划对于未来发生了改变的数据未必即便轻便的，存在着目前的厉行计划不中意未来数据的改变后的效率，而新的普查消息的情形下所发生的厉行计划也并不是全副都科学的。那这个时候，我们能够批准新搜集的普查消息，然而却对新普查消息下不良的厉行计划批准Oracle供给的厉行计划安宁性这个力气安宁厉行计划，这么联合起来我们能够发生顺心的高效的数据库运行环境。</span><span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'Tahoma'; "><br /></span><span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'Tahoma'; "><br /></span><span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">&nbsp;&nbsp;&nbsp;&nbsp;</span>&nbsp;<span style="mso-spacerun:'yes'; color:#333333; font-size:10.5000pt; font-family:'Tahoma'; background:#ffffff; ">我们还必需关怀的一个东西，Oracle供给的dbms_stats包除非具有搜集普查消息的力气，还具有把数据库中普查消息(statistics)export/import的力气，还具有只搜集普查消息而使得普查消息不利用于数据库的力气(把普查消息搜集到一个特定的表中而不是即刻见效)，在这个基础上我们就能够把普查消息export出来再import到一个测验环境中，再运行我们的利用，在测验环境中我们考察最新的普查消息会导致哪些厉行计划发生改变(DB&nbsp;EXPERT的Plan&nbsp;Version&nbsp;Tracer是模仿不同环境并积极察看不同环境中厉行计划改变的工具)，是变好了还是变差了。我们能够把变差的这一局部在测验环境中利用hints可能利用工具(SQL&nbsp;EXPERT是在重写SQL这一领土现在最强有力的工具)发生良好的厉行计划的SQL，利用这些SQL能够发生OUTLINES,然后在产品数据库利用最新的普查消息的同时移植进这些OUTLINES。<br /><br /><br /><p style="margin-left:18.0000pt; text-indent:-18.0000pt; margin-bottom:0pt; margin-top:0pt; "><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'Times New Roman'; ">&nbsp;</span><span style="mso-spacerun:'yes'; color:#ff0000; font-size:10.5000pt; font-family:'宋体'; ">java报表工具：</span></p><p style="margin-left:18.0000pt; margin-bottom:0pt; margin-top:0pt; "><a href="http://www.finereport.com/javareport"><span style="color: #ff0000; font-size: 10pt; font-family: 'Times New Roman'; ">http://www.finereport.com/javareport</span></a>&nbsp;</p></span></p></div><img src ="http://www.blogjava.net/echoseason/aggbug/386158.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/echoseason/" target="_blank">season</a> 2012-08-23 23:31 <a href="http://www.blogjava.net/echoseason/archive/2012/08/23/386158.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>java报表工具中本地效果与服务器效果不一致问题处理经验分享</title><link>http://www.blogjava.net/echoseason/archive/2012/08/23/386156.html</link><dc:creator>season</dc:creator><author>season</author><pubDate>Thu, 23 Aug 2012 15:14:00 GMT</pubDate><guid>http://www.blogjava.net/echoseason/archive/2012/08/23/386156.html</guid><wfw:comment>http://www.blogjava.net/echoseason/comments/386156.html</wfw:comment><comments>http://www.blogjava.net/echoseason/archive/2012/08/23/386156.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/echoseason/comments/commentRss/386156.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/echoseason/services/trackbacks/386156.html</trackback:ping><description><![CDATA[<div><p style="margin-bottom:0pt; margin-top:0pt; text-align:center; background:#ffffff; "><span style="color: #444444; font-family: 宋体; font-size: 10.5pt; ">我们做报表通常情况下都是在本地PC机上调试没问题后再发布到服务器上，这个时候经常会出现本地明明调的很好的模板发布后就不对了！！！这边将我遇到过的所有本地效果与服务器效果不一致的问题及解决思路整理下来~~~~</span></p><p style="margin-bottom:0pt; margin-top:0pt; "><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">当你发现同一张报表在本地环境中访问正常，但是发布到服务器后就不正常了，不管是哪边不正常，首先要做的一定是</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#ff0000; font-weight:bold; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">A.&nbsp;检查一下是不是同一张模板，最好是重新部署一下</span><span style="mso-spacerun:'yes'; color:#444444; font-weight:bold; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#ff0000; font-weight:bold; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">B.&nbsp;检查一下服务器的jar包与本地的jar包版本是否相同，一定要保证jar版本相同，同步后要重启服务器</span><span style="mso-spacerun:'yes'; color:#444444; font-weight:bold; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">检查方法</span><a href="http://www.finereporthelp.com/help/4/0/6/8.html"><span style="color: #336699; font-size: 10.5pt; font-family: 宋体; background-color: #ffffff; background-position: initial initial; background-repeat: initial initial; ">http://www.finereporthelp.com/help/4/0/6/8.html</span></a><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">在确保上面两点都已经检查的情况下，若还有问题，再具体分析。</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#0000ff; font-weight:bold; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">问题1.&nbsp;部署后报表报错如nullpointer，或者其他非数据相关的错误</span>&nbsp;</p><p style="margin-bottom:0pt; margin-top:0pt; "><span style="mso-spacerun:'yes'; color:#444444; font-weight:bold; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">原因</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">：最常见的原因是服务器jar与本地jar版本不同；其次是模板没有同步</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-weight:bold; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">纠错思路</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">：</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A、B两步</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;如果还有问题，则可能是bug，联系FR技术</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#0000ff; font-weight:bold; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">问题2.&nbsp;部署后报找不到数据连接</span><span style="mso-spacerun:'yes'; color:#444444; font-weight:bold; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-weight:bold; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">原因</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">：服务器数据连接定义有问题，比如本地定义的数据连接名字用的test，报表数据集那边选择的数据库是test，而服务器为了规范，把数据连接名字改了如db，模板中数据集那边没改，还是用的test，就错了</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-weight:bold; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">纠错思路</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">：</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A、B两步</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;然后确认本地数据连接定义与服务器数据连接定义是否正确</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;再确认模板数据集那边使用的数据库是否正确</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;这里最好是测试环境与正式环境尽可能的相同，发布报表的时候数据相关的配置文件datasource.xml也要上传</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#0000ff; font-weight:bold; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">问题3.&nbsp;部署后报表空的，没有数据/下拉控件中没有数据等</span><span style="mso-spacerun:'yes'; color:#444444; font-weight:bold; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-weight:bold; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">原因</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">：和上面一个问题类似，都是数据问题，往往都是本地环境中定义的数据连接、数据表与服务器名字等不一致导致，比如模板数据集被误删了，被传到了服务器上，数据没了</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-weight:bold; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">纠错思路</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">：</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A、B两步</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;确认数据连接定义对不对</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;确认模板中的数据集定义对不对</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#0000ff; font-weight:bold; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">问题4.&nbsp;部署后报表可以访问，但是与本地有差异</span><span style="mso-spacerun:'yes'; color:#444444; font-weight:bold; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-weight:bold; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">原因</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">：通常都是模板不同步导致，比如改了一个小地方，以为自己覆盖服务器上的模板了，实际上还没传</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-weight:bold; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">纠错思路</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">：</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A、B&nbsp;两步</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#0000ff; font-weight:bold; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">问题5.&nbsp;部署后报表工具栏不见了</span><span style="mso-spacerun:'yes'; color:#444444; font-weight:bold; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-weight:bold; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">原因</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">：模板工具栏设置用的是服务器设置，而服务器上的没设置全局工具栏</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-weight:bold; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">纠错思路</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">：</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A、B两步</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;打开模板看一下工具栏用的为该模板单独设置还是采用的服务器设置</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;如果用的是服务器设置，则设计器远程登陆到服务器环境，看一下服务器设置工具栏有没有</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;部署的时候注意要把服务器配置config.xml也要传到服务器上</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#0000ff; font-weight:bold; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">问题6.&nbsp;部署后报表原来居中显示的变成居左显示了或相反情况</span><span style="mso-spacerun:'yes'; color:#444444; font-weight:bold; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-weight:bold; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">原因</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">：和上面的问题类似，用的是服务器配置，而服务器配置中设置不正确</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-weight:bold; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">纠错思路</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">：</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A、B两步</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;打开模板看一下预览配置用的是单独配置还是采用服务器设置</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;一般可以直接改为单独设置，把显示位置改为如居中，再重新上传一下模板</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;如果还是不行，则可能是bug，联系FR技术</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#0000ff; font-weight:bold; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">问题7.&nbsp;部署后报表边框缺失了</span><span style="mso-spacerun:'yes'; color:#444444; font-weight:bold; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-weight:bold; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">原因</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">：这个一般是服务器jar与本地jar版本不同导致</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-weight:bold; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">纠错思路</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">：</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A、B两步</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;jar同步后本地好的，服务器上还是有问题，则可能是bug，联系FR技术</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;边框问题FR这边处理的不完美，通常遇到这样的情况，和FR反馈后，自己也通过一些变通的方法解决，比如在临近的单元格加上边框</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#0000ff; font-weight:bold; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">问题8.&nbsp;部署后报表单元格自动调整行高效果不对</span><span style="mso-spacerun:'yes'; color:#444444; font-weight:bold; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-weight:bold; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">原因</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">：这个一般是服务器jar与本地jar版本不同导致</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-weight:bold; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">纠错思路</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">：</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A、B两步</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;jar同步后本地好的，服务器上还是有问题，则可能是bug，联系FR技术</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#0000ff; font-weight:bold; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">问题9.&nbsp;部署报表后地图显示不出来</span></p><p style="margin-bottom: 0pt; margin-top: 0pt; "><span style="mso-spacerun:'yes'; color:#444444; font-weight:bold; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">原因</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">：部署的时候没把地图用到的内置数据库拷贝到服务器</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-weight:bold; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">纠错思路</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">：</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A、B两步</span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; "><br /></span><span style="mso-spacerun:'yes'; color:#444444; font-size:10.5000pt; font-family:'宋体'; background:#ffffff; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;确认WEB-INF\resources\chartdb有没有拷贝到服务器<br /><br /><br /><span style="color: #ff0000; font-size: 10.5pt; text-indent: -18pt; ">java报表工具：</span><br /><p style="margin-left:18.0000pt; margin-bottom:0pt; margin-top:0pt; "><a href="http://www.finereport.com/javareport"><span style="color: #ff0000; font-size: 10pt; font-family: 'Times New Roman'; ">http://www.finereport.com/javareport</span></a>&nbsp;</p></span></p></div><img src ="http://www.blogjava.net/echoseason/aggbug/386156.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/echoseason/" target="_blank">season</a> 2012-08-23 23:14 <a href="http://www.blogjava.net/echoseason/archive/2012/08/23/386156.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>程序数据集传参使用解决方案</title><link>http://www.blogjava.net/echoseason/archive/2011/12/01/365270.html</link><dc:creator>season</dc:creator><author>season</author><pubDate>Thu, 01 Dec 2011 03:39:00 GMT</pubDate><guid>http://www.blogjava.net/echoseason/archive/2011/12/01/365270.html</guid><wfw:comment>http://www.blogjava.net/echoseason/comments/365270.html</wfw:comment><comments>http://www.blogjava.net/echoseason/archive/2011/12/01/365270.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/echoseason/comments/commentRss/365270.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/echoseason/services/trackbacks/365270.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 通过TableData接口可以读取任何形式的数据源，java报表FineReport报表的数据来源可以是数据库数据或是文本数据，并且还可以是其它任何类型的数据，因为这些所有的数据来源都实现了TableData接口，所以用户只要实现了TableData接口，也就可以用自定义类型的数据源了。对于传参，我们可以在程序数据集中写入传入的参数，此方案传入的参数为&nbsp;tableName&nbsp;和c...&nbsp;&nbsp;<a href='http://www.blogjava.net/echoseason/archive/2011/12/01/365270.html'>阅读全文</a><img src ="http://www.blogjava.net/echoseason/aggbug/365270.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/echoseason/" target="_blank">season</a> 2011-12-01 11:39 <a href="http://www.blogjava.net/echoseason/archive/2011/12/01/365270.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>FineReport报表工具关于Linux下字体乱码终极解决方案</title><link>http://www.blogjava.net/echoseason/archive/2011/11/10/363381.html</link><dc:creator>season</dc:creator><author>season</author><pubDate>Thu, 10 Nov 2011 02:07:00 GMT</pubDate><guid>http://www.blogjava.net/echoseason/archive/2011/11/10/363381.html</guid><wfw:comment>http://www.blogjava.net/echoseason/comments/363381.html</wfw:comment><comments>http://www.blogjava.net/echoseason/archive/2011/11/10/363381.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/echoseason/comments/commentRss/363381.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/echoseason/services/trackbacks/363381.html</trackback:ping><description><![CDATA[<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><span style="mso-bidi-font-size: 10.5pt" lang="EN-US"><font face="Times New Roman"></font></span><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><span style="mso-bidi-font-size: 10.5pt" lang="EN-US">1</span><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">：在</span><span style="mso-bidi-font-size: 10.5pt" lang="EN-US">windows</span><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下找到系统使用到的字体，这里以楷体举例</span><span style="mso-bidi-font-size: 10.5pt" lang="EN-US"><o:p></o:p></span></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">&#183;到</span><span style="mso-bidi-font-size: 10.5pt" lang="EN-US">c</span><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">盘的</span><span style="mso-bidi-font-size: 10.5pt" lang="EN-US"> windows</span><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">文件夹的</span><span style="mso-bidi-font-size: 10.5pt" lang="EN-US"> Fonts</span><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">文件夹里面存放了</span><span style="mso-bidi-font-size: 10.5pt" lang="EN-US">windows</span><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中用到的所有字体，具体路径</span><span style="mso-bidi-font-size: 10.5pt" lang="EN-US">C:\WINDOWS\Fonts<o:p></o:p></span></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">&#183;找到楷体字体</span><span style="mso-bidi-font-size: 10.5pt" lang="EN-US">SIMKAI.TTF<o:p></o:p></span></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><span style="mso-bidi-font-size: 10.5pt" lang="EN-US"><v:shapetype id="_x0000_t75" stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75" coordsize="21600,21600"><v:stroke joinstyle="miter"></v:stroke><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"></v:f><v:f eqn="sum @0 1 0"></v:f><v:f eqn="sum 0 0 @1"></v:f><v:f eqn="prod @2 1 2"></v:f><v:f eqn="prod @3 21600 pixelWidth"></v:f><v:f eqn="prod @3 21600 pixelHeight"></v:f><v:f eqn="sum @0 0 1"></v:f><v:f eqn="prod @6 1 2"></v:f><v:f eqn="prod @7 21600 pixelWidth"></v:f><v:f eqn="sum @8 21600 0"></v:f><v:f eqn="prod @7 21600 pixelHeight"></v:f><v:f eqn="sum @10 21600 0"></v:f></v:formulas><v:path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f"></v:path><o:lock aspectratio="t" v:ext="edit"></o:lock></v:shapetype><img border="0" alt="" src="http://www.finereport.com/forumimages/font.png " width="84" height="81" /><o:p></o:p></span></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><span style="mso-bidi-font-size: 10.5pt" lang="EN-US"><a href="http://www.finereport.com/forumimages/font.png"><font color="#0000ff">http://www.finereport.com/forumimages/font.png</font></a> <o:p></o:p></span></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><span style="mso-bidi-font-size: 10.5pt" lang="EN-US">2</span><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">：将楷体字体拷贝到</span><u><span style="color: #00b0f0; mso-bidi-font-size: 10.5pt" lang="EN-US">Linux</span></u><u><span style="font-family: 宋体; color: #00b0f0; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">操作系统软件</span></u><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下</span><span style="mso-bidi-font-size: 10.5pt" lang="EN-US">JRE</span><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下的</span><span style="mso-bidi-font-size: 10.5pt" lang="EN-US">\lib\fonts</span><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">文件夹</span><span style="mso-bidi-font-size: 10.5pt" lang="EN-US"><o:p></o:p></span></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">&#183;注意这个</span><span style="mso-bidi-font-size: 10.5pt" lang="EN-US">JRE</span><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">必须是服务器用到的</span><span style="mso-bidi-font-size: 10.5pt" lang="EN-US">JDK</span><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下的</span><span style="mso-bidi-font-size: 10.5pt" lang="EN-US">JRE<o:p></o:p></span></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">例如服务器为</span><span style="mso-bidi-font-size: 10.5pt" lang="EN-US">tomcat <o:p></o:p></span></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">使用的</span><span style="mso-bidi-font-size: 10.5pt"> <span lang="EN-US">jdk</span></span><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是</span><span style="mso-bidi-font-size: 10.5pt" lang="EN-US">usr</span><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下</span><span style="mso-bidi-font-size: 10.5pt" lang="EN-US"> /java/jdk1.5.0_13<o:p></o:p></span></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">登陆到</span><u><span style="color: #00b0f0; mso-bidi-font-size: 10.5pt" lang="EN-US">linux</span></u><u><span style="font-family: 宋体; color: #00b0f0; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">操作系统软件</span></u><span style="mso-bidi-font-size: 10.5pt" lang="EN-US"><o:p></o:p></span></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><span style="mso-bidi-font-size: 10.5pt" lang="EN-US">Cd</span><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">到</span><span style="mso-bidi-font-size: 10.5pt" lang="EN-US">usr/java/jdk1.5.0_13/jre/lib/fonts<o:p></o:p></span></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">&#183;登陆到</span><span style="mso-bidi-font-size: 10.5pt" lang="EN-US">ftp </span><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">将之前准备好的楷体拷贝到当前目录下</span><span style="mso-bidi-font-size: 10.5pt" lang="EN-US"><o:p></o:p></span></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><span style="mso-bidi-font-size: 10.5pt" lang="EN-US">ftp id<o:p></o:p></span></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt">转到字体所在位置<span lang="EN-US"><o:p></o:p></span></span></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt" lang="EN-US">get SIMKAL.TTF </span><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt">到当前目录下<span lang="EN-US"><o:p></o:p></span></span></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt" lang="EN-US">exit </span><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt">退出<span style="color: #00b0f0" lang="EN-US">ftp</span><span style="color: #00b0f0">工具就可以了</span><span lang="EN-US"><o:p></o:p></span></span></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><span style="mso-bidi-font-size: 10.5pt" lang="EN-US">3</span><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">：重启服务器</span><span style="mso-bidi-font-size: 10.5pt"> </span><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">解决<u><span style="color: #00b0f0">功能强大的操作系统</span></u></span><u><span style="color: #00b0f0; mso-bidi-font-size: 10.5pt" lang="EN-US">linux</span></u><span style="font-family: 宋体; mso-bidi-font-size: 10.5pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下字体乱码问题</span><span style="mso-bidi-font-size: 10.5pt" lang="EN-US"><o:p></o:p></span></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal">文章转自：<span style="font-family: 'Times New Roman','serif'; font-size: 10.5pt; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 宋体; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA" lang="EN-US"><a href="http://blog.vsharing.com/fanfanzheng/A1443212.html"><font color="#0000ff">http://blog.vsharing.com/fanfanzheng/A1443212.html</font></a></span></span></p>  <img src ="http://www.blogjava.net/echoseason/aggbug/363381.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/echoseason/" target="_blank">season</a> 2011-11-10 10:07 <a href="http://www.blogjava.net/echoseason/archive/2011/11/10/363381.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>JAVA报表工具中Cannot create PoolableConnectionFactory解决方案</title><link>http://www.blogjava.net/echoseason/archive/2011/09/05/357975.html</link><dc:creator>season</dc:creator><author>season</author><pubDate>Mon, 05 Sep 2011 02:29:00 GMT</pubDate><guid>http://www.blogjava.net/echoseason/archive/2011/09/05/357975.html</guid><wfw:comment>http://www.blogjava.net/echoseason/comments/357975.html</wfw:comment><comments>http://www.blogjava.net/echoseason/archive/2011/09/05/357975.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/echoseason/comments/commentRss/357975.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/echoseason/services/trackbacks/357975.html</trackback:ping><description><![CDATA[<p><strong><span style="font-size:14.0pt;font-family:宋体;color:#3366FF"></span></strong></p><div>  <p><span style="font-family:宋体">&nbsp;&nbsp;&nbsp; </span><span style=" font-family:宋体">在<a href="http://www.finereport.com/">FineReport<span><span>报表</span></span></a></span>中，连接Oracle数据库时，有时会出现Cannot create PoolableConnectionFactory的报错，该错误原因是无法创建连接池工厂对象。这时可能是服务器端口地址、端口、数据库名或者数据库实例名等信息错误。下面详细介绍<a href="http://www.finereport.com/knowledge/design">java<span><span>报表工具</span></span></a>中如何解决该问题。</p>  <p style="margin-left:18.0pt;text-indent:-18.0pt;"><strong><span style="font-family:宋体;color:navy">1.&nbsp;</span></strong><strong><span style=" font-family:宋体;color:navy">可能sid_name出错，需要修改sid_name</span></strong></p>  <p style="margin-left:18.0pt"><span style="font-family:宋体;color:#020202">该错误常见日志的报错信息为：</span></p>  <p style="margin-left:18.0pt"><span style="font-family:宋体; color:#020202">ORA-12505:TNS:listener&nbsp;does&nbsp;not&nbsp;currently&nbsp;know&nbsp;of&nbsp;SID&nbsp;given&nbsp;in&nbsp;connect&nbsp;descriptor<br /> The&nbsp;Connection&nbsp;descriptor&nbsp;used&nbsp;by&nbsp;the&nbsp;client&nbsp;was:<br /> 172.30.10.15:1521:slsdb</span></p>  <p style="margin-left:18.0pt"><span style="font-family:宋体">该错误中slsdb不是正确的sid_name，可能是server_name，因此只要修改sid_name就行。重启后<a href="http://www.finereport.com/products/functions"><span><span>报表工具</span></span></a></span>就能正常运行。</p>  <p style="margin-left:18.0pt;text-indent:-18.0pt;"><strong><span style="font-family:宋体;color:navy">2.&nbsp;</span></strong><strong><span style=" font-family:宋体;color:navy">配置连接池时出错</span></strong></p>  <p style="margin-left:18.0pt"><span style="font-family:宋体;color:black">该错误常见报错日志为：</span></p>  <p style="margin-left:18.0pt"><span style="font-family:宋体;color:black">TNS-12505:TNS:listener could not resolve SID given in connect descriptor</span></p>  <p style="margin-left:18.0pt"><span style="font-family:宋体;color:black">解决1：看看端口后面的sid是否写错。</span></p>  <p style="margin-left:18.0pt"><span style="font-family:宋体;color:black">解决2：在oracle里面用tnsping，检查一下listener启动了没有，再看看listener config file里面有没有写上你的SID。</span></p>  <p style="margin-left:18.0pt"><span style="font-family:宋体;color:black">解决3：到服务器上看一下，listener.ora</span></p>  <p style="margin-left:18.0pt"><span style="font-family:宋体;color:black">SID_LIST_LISTENER=</span></p>  <p style="margin-left:18.0pt"><span style="font-family:宋体;color:black">(SID_DESC=</span></p>  <p style="margin-left:18.0pt"><span style="font-family:宋体;color:black">(GLOBAL_DBNAME=oracle9i)</span></p>  <p style="margin-left:18.0pt"><span style="font-family:宋体;color:black">(ORACLE_HOME=/opt/oracle9i/product/9.2.0)</span></p>  <p style="margin-left:18.0pt"><span style="font-family:宋体;color:black">(SID_NAME=ORCL)</span></p>  <p style="margin-left:18.0pt"><span style="font-family:宋体;color:black">)</span></p>  <p style="margin-left:18.0pt"><span style="font-family:宋体;color:black">你的url里面可能用的是上面的GLOBAL_DBNAME的值，就是用的SERVICE_NAME，替换成SID_NAME，也可以登录sqlplus服务器$sqlplus/as sysdba&nbsp;SQL&gt;SELECT * FROM V$instance;查看本机上sid的名字。</span></p>  <p style="margin-left:18.0pt;text-indent:-18.0pt;"><strong><span style="font-family:宋体;color:navy">3.&nbsp;</span></strong><strong><span style=" font-family:宋体;color:navy">监听器不能解析SERVICE_NAME</span></strong></p>  <p style="margin-left:18.0pt"><span style="font-family:宋体">报错日志为：</span></p>  <p style="margin-left:18.0pt"><span style="font-family:宋体">ORA-12514<span style="color:black">:TNS:</span></span><span style=" font-family:宋体;color:black">监听进程不能解析在连接描述符中给出的SERVICE_NAME</span></p>  <p style="margin-left:18.0pt"><span style="font-family:宋体;color:black">解决方法：SID_NAME跟安装oracle时的ORACLE_SID相同，<span>SERVICE_NAME=DBNAME.DB_DOMAIN<br /> DBNAME</span>即是数据库名，它是oracle数据库的内部标识，安装以后轻易不要修改</span></p>  </div><p style="margin-left: 18pt;"><span style="font-family: 宋体; color: black;"></span></p><p style="margin-left: 18pt;"><span style="font-family: 宋体; color: black;">文章转载：</span></p><div><a href="http://bbs.vsharing.com/Management/Bi-Ci/1407448-1.html">http://bbs.vsharing.com/Management/Bi-Ci/1407448-1.html</a></div><br /><p>&nbsp;</p> <img src ="http://www.blogjava.net/echoseason/aggbug/357975.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/echoseason/" target="_blank">season</a> 2011-09-05 10:29 <a href="http://www.blogjava.net/echoseason/archive/2011/09/05/357975.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>6.5 Java报表工具注册常见问题处理方案</title><link>http://www.blogjava.net/echoseason/archive/2011/08/29/357495.html</link><dc:creator>season</dc:creator><author>season</author><pubDate>Mon, 29 Aug 2011 06:13:00 GMT</pubDate><guid>http://www.blogjava.net/echoseason/archive/2011/08/29/357495.html</guid><wfw:comment>http://www.blogjava.net/echoseason/comments/357495.html</wfw:comment><comments>http://www.blogjava.net/echoseason/archive/2011/08/29/357495.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/echoseason/comments/commentRss/357495.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/echoseason/services/trackbacks/357495.html</trackback:ping><description><![CDATA[<p><strong><span style="font-size:14.0pt;color:#3366FF"><br /></span></strong></p>  <p style="text-indent:21.0pt;"><span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">最近一个月在</span><a href="http://www.finereport.com/javareport">java<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;"><span>报表工具</span></span></a><span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">注册时，山东迪艾思，上海泛微，上海</span>IBM<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">都有注册不成功的情况。</span><span><br /> </span><span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">大抵分三种情形：</span><span><br /> 1.</span><span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">版本、并发数不对，没有严格按照订货单来，注意标准版和企业版的区别。</span><span><br /> &nbsp;&nbsp;&nbsp;</span><span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">这个原因往往是客户那边的商务部和技术部没有沟通协调好（上海泛微）</span><span><br /> 2.Mac</span><span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">地址不对，多个网卡（山东迪艾思）</span><span><br /> 3.</span><span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">要求是服务器上的</span>mac<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">地址，不能是本机上的（上海</span>IBM<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">）</span></p>  <p><strong>&nbsp;</strong></p>  <p><strong><span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;;color:navy">发生在</span><span style="color:navy">linux</span></strong><strong><span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;;color:navy">或</span><span style="color:navy">unix</span></strong><strong><span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;;color:navy">系统下的</span></strong><a href="http://www.finereport.com/"><strong><span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;"><span>报表</span></span></strong></a><strong><span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;;color:navy">注册：</span></strong><span><br /> 1.&nbsp;&nbsp;1inux</span><span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">或</span>unix<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">系统的</span>mac<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">地址格式和一般的</span>mac<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">形式不一样，比如为</span> 0*001F296EFD64<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">，此时不要奇怪，和一般情况下一样注册。</span><span><br /> 2.&nbsp;&nbsp;</span><span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">在</span>linux<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">下注册，填好公司名称和项目名称后，弹出的文件是</span> ReportSever<span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;">文件（不是</span>txt<span style="font-family: 宋体;">文件）。若在没有关掉迅雷监听浏览器，不可进行注册，此时应将其关掉，便可注册。</span></p><p><span style="font-family: 宋体;">文章转自：<a href="http://blog.vsharing.com/fanfanzheng/A1404193.html">http://blog.vsharing.com/fanfanzheng/A1404193.html</a></span><span style="font-family:宋体;Times New Roman&quot;;Times New Roman&quot;"><div></div><br /></span></p>  <img src ="http://www.blogjava.net/echoseason/aggbug/357495.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/echoseason/" target="_blank">season</a> 2011-08-29 14:13 <a href="http://www.blogjava.net/echoseason/archive/2011/08/29/357495.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>