开发者

Birt Global Integer

I have a Birt Report which read some stuff from a database. After that i want to increment a global Integer for every Detailrow that is loaded. So far i have initialized a global Integer with the following lines:开发者_运维百科

importPackage(Packages.java.lang);
reportContext.setPersistentGlobalVariable("minTotalPlus", new Integer(0));

After that i added the following line into a field in my detail row:

reportContext.setGlobalVariable("minTotalPlus",  new Integer reportContext.getGlobalVariable("minTotalPlus")) + 1);

When i preview the report i get an "java.lang.NumberFormatException: null" which means that the global variable is null. Why is that so? How could I fix that?


Dont' declare variables like that in the initialize method declare the like the following

materiales=0;
tools=0;

then in the fetch method use the following

tools++;

...etc.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜