PHP通过PHP/JAVA Bridge调用JasperReport报表(3)
58 $className == 'java.lang.Long' ||
59 $className == 'java.lang.Short' ||
60 $className == 'java.lang.Double' ||
61 $className == 'java.math.BigDecimal')
62 {
63 $temp = new Java($className, $value);
64 return $temp;
65 }
66 else if ($className == 'java.sql.Timestamp' ||
67 $className == 'java.sql.Time')
68 {
69 $temp = new Java($className);
70 $javaObject = $temp->valueOf($value);
71 return $javaObject;
72 }
73 }
74 catch (Exception $err)
75 {
76 echo ( 'unable to convert value, ' . $value .
77 ' could not be converted to ' . $className);
78 return false;
79 }
80
81 echo ( 'unable to convert value, class name '.$className.
82 ' not recognised');
83 return false;
84 }
85
86
87 checkJavaExtension();
88
89 $compileManager = new JavaClass("net.sf.jasperreports.engine.JasperCompileManager");
90 $report = $compileManager->compileReport(realpath("test.jrxml"));
91
92 $fillManager = new JavaClass("net.sf.jasperreports.engine.JasperFillManager");
相关新闻>>
- 发表评论
-
- 最新评论 更多>>