bluesoft-rnd / aperte-reports

Automatically exported from code.google.com/p/aperte-reports
0 stars 4 forks source link

Generated report with null data #16

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I use iReport4.5.1 to make a jrxml file. To ensure the jrxml file and data 
resource is correct, I use Preview. The report can be generated well.
2. I change the context.xml in {liferay}/{tomcat}/conf to add the Resource:
<Resource name="jdbc/aperte-reports" auth="Container" 
type="javax.sql.DataSource"
          maxActive="20" maxIdle="5" maxWait="10000"
          username="root" password="rootroot" driverClassName="com.mysql.jdbc.Driver"
          url="jdbc:mysql://10.45.7.23:3306/pcef_test?autoReconnect=true&amp;useUnicode=true&amp;characterEncoding=utf8&amp;"/>

3. I upload the jrxml file.
4. I choose output format: XLS. The xls file is generated with no error.

What is the expected output? What do you see instead?
The xls file should be filled the data. I see the "null" is filled in the data 
field.

By the way, if I choose any other format, no more errors occurs, but the file 
can not be generated.

What version of the product are you using? On what operating system?
Ubuntu 10.04, Liferay6.1.0, MySQL 5.1.37, aperte-reports-ui-2.3-RC1

Original issue reported on code.google.com by njche...@gmail.com on 24 Apr 2012 at 3:18

Attachments:

GoogleCodeExporter commented 9 years ago
It looks like there is missing datasource parameter:
http://code.google.com/p/aperte-reports/wiki/ReportParameters#Report_datasource_
parameter

Please check if that helps.

This is AR-specific parameter, identifying JNDI datasource name which will be 
used by query.

Thanks for issue report, we will think about some clear notification in such 
case.

Original comment by zmalinow...@bluesoft.net.pl on 25 Apr 2012 at 10:53

GoogleCodeExporter commented 9 years ago
Hi, thank you for your reply.
For mentioned page, there is a mistake. The original is:
<parameter name="datasource" class="java.lang.String">
    <parameterDescription><![CDATA[java:comp/env/jdbc/aperte-reports_production]]</parameterDescription>
  </parameter>

Should be:
<parameter name="datasource" class="java.lang.String">
    <parameterDescription><![CDATA[java:comp/env/jdbc/aperte-reports_production]]></parameterDescription>
  </parameter>

So I add:
<parameter name="datasource" class="java.lang.String">
        <parameterDescription><![CDATA[java:comp/env/jdbc/aperte-reports]]></parameterDescription>
    </parameter>
Now the report generates well.

By the way, I generate .xls file. For date column, I choose Chinese format. I 
can use iReport to do. But for Aperte Report, it can not work correctly. The 
date column is filled by some double number, for example 41007.5448148148. 
Other Chinese data column is correct.

Original comment by njche...@gmail.com on 25 Apr 2012 at 11:44