2014-10-09 153 views
0

我是一名OFBIZ和BIRT新手,我试图修改现有报告“付款报告”,但我无法获得任何数据。我想是因为我得到的错误,BIRT报告修改

The following items have errors: 

ReportDesign (id = 1): 
+ An exception occurred during processing. Please see the following message for  details: 
A BIRT exception occurred. See next exception for more information. 
Invalid javascript expression: measure["amount"] (Element ID:1) 
+ Can not find the prepared query o[email protected]a91e3d. (Element ID:1) 

这是在ofbiz脚本“开放”:

payments = null; 
userLogin = null; 
parameters = null; 
try { 
    userLogin = delegator.findByPrimaryKey("UserLogin",UtilMisc.toMap("userLoginId","admin")); 
} catch(e) { 
     Debug.logError(e,""); 
} 
input = FastMap.newInstance(); 
inputFields = FastMap.newInstance(); 
if(params!=null){ 
    inputFields.put("partyIdTo", params["partyIdTo"]); 
    inputFields.put("paymentId", params["paymentId"]); 
    inputFields.put("paymentTypeId", params["paymentTypeId"]); 
    inputFields.put("paymentId_op", params["paymentId_op"]); 
    inputFields.put("paymentRefNum_ic", params["paymentRefNum_ic"]); 
    inputFields.put("noConditionFind", params["noConditionFind"]); 
    inputFields.put("partyIdFrom", params["partyIdFrom"]); 
    inputFields.put("paymentRefNum_op", params["paymentRefNum_op"]); 
    inputFields.put("amount", params["amount"]); 
    inputFields.put("statusId", params["statusId"]); 
    inputFields.put("paymentGatewayResponseId", params["paymentGatewayResponseId"]); 
    inputFields.put("paymentId_ic", params["paymentId_ic"]); 
    inputFields.put("paymentRefNum", params["paymentRefNum"]); 
    inputFields.put("comments_ic", params["comments_ic"]); 
    inputFields.put("comments_op", params["comments_op"]); 
    inputFields.put("comments", params["comments"]); 
} 
input.put("userLogin",userLogin); 
input.put("inputFields",inputFields); 
input.put("entityName","PaymentAndType"); 
input.put("orderBy","effectiveDate DESC"); 
//input.put("viewIndex", 0); 
//input.put("viewSize", 20); 
try { 
    result = dispatcher.runSync("performFind", input); 
    payments = result.get("listIt"); 
} catch (e) { 
    Debug.logError(e, module); 
} 

我已经修改了Entityengine.xml并得到了德比OFBiz的架构到Oracle 。
我试着修改脚本文件,但经过一些修改(ofbiz数据源是不可编辑的,我用eclipse编辑.rptdesign文件)我得到这个错误。 (“支付报告”内置于:“Eclipse BIRT Designer版本2.5.1.v20090903” 但我使用:“Eclipse BIRT Designer版本4.3.1.v201309091055”所以当保存并运行这个,我得到错误)

org.eclipse.birt.report.engine.api.EngineException: The design file <stream> has error and can not be run. 

因为我发现,这发生在版本不兼容,所以我怎么能改变这个文件并获取数据? 。我做错了什么?谢谢并且对于糟糕的英语和缺乏信息感到抱歉。

回答

0

在BIRT Designer中,尝试对rptdesign文件进行一个简单的更改(例如更新描述),然后保存(而不是同时运行)。这应该将文件更新到最新版本的BIRT Designer。然后再次运行它以查看EngineException是否消失。

+0

嗨@ user3660637 - 邑我尝试慢慢修改它与两个版本,几乎没有修改它是好的。但几乎一个配置文件将在那里,我得到错误'org.eclipse.birt.report.engine.api.EngineException:设计文件有错误,无法运行.'。所以有什么提示?并抱歉迟到重播。 – Archangle 2014-10-14 04:11:21

0

BIRT向后兼容,因此早期版本报告(2.5)将在BIRT的新版本(4.3)上运行。我看到你说你已经试图保存报告,但报告仍然列为2.5版本,这意味着它不保存你的更改。如果报告正在更新,它会更新到您正在构建的新版本(4.3)。

很可能在现有报告中有一个错误被2.5忽略,但不会在4.3中运行。

最简单的解决方案(最适合您的教育)是从零开始重建4.3中的报告。在构建时测试它,确保它以最简单的形式运行。在构建时,您会发现并纠正2.5中允许的设计缺陷,因为您正在使用4.3构建,所以您不会创建缺陷/错误。

+0

嗨,詹姆斯,真的非常感谢您的输入。我已尝试使用这两个版本。如果我用4.3重建它,我得到'org.eclipse.birt.report.engine.api.EngineException:设计文件有错误,无法运行。' – Archangle 2014-10-14 03:36:29

+0

嗨,@詹姆斯 - 真的感谢您的输入。我有尝试两种版本到目前为止。如果我用4.3重建它,我得到'org.eclipse.birt.report.engine.api.EngineException:设计文件有错误,无法运行.',如果我用2.5构建它,我得到驱动程序的classdif错误( birt EngineException)。 – Archangle 2014-10-14 03:43:14

+0

@Archangle从你在答案中的评论,它听起来像你在错误中构建。不知道这里有人能帮助你解决你的问题。 – 2014-10-14 18:50:09