无法解析为Jaspersoft Studio类型 [英] cannot be resolved to a Type Jaspersoft Studio
问题描述
使用jaspersoft Studio 6.1.1
Using jaspersoft Studio 6.1.1
我想要实现的是将我得到的数字转换为罗马格式,为此,我添加了一个创建的.jar以完成这项工作,问题是,当我尝试使用.jar中的函数,出现以下错误:
What i'm trying to achieve is to transform the numbers i get to the Roman format, and for that i added a .jar that i created to do the job, the problem is, when i'm trying to use the functions in my .jar, i get the errors below:
net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
1. RomanNumeral.roman cannot be resolved to a type
value = new RomanNumeral.roman(1); //$JR_EXPR_ID=8$
<---------------->
2. RomanNumeral.roman cannot be resolved to a type
value = new RomanNumeral.roman(1); //$JR_EXPR_ID=8$
<---------------->
3. RomanNumeral.roman cannot be resolved to a type
value = new RomanNumeral.roman(1); //$JR_EXPR_ID=8$
<---------------->
3 errors
RomanNumeral是.jar和类的名称.
RomanNumeral is the name is the .jar and the class.
我到处寻找类似的错误,但没有帮助
I looked everywhere for a similar error and that didn't help
知道为什么会这样吗?
推荐答案
我可以解决我的问题,如果有人遇到同样的问题,希望对他们有帮助.
i could fix my problem, if someone have the same problem, i hope this can help them.
将.jar添加到项目的Java构建路径后,必须将其导入到要使用的报表中.
After you add the .jar to your java build path of your project, you have to import it to the report you want to use.
然后,要使用您的.jar中的函数,我必须编写类似"package.Class.Method"的函数路径,以我的情况为例:
Then, to use the functions in your .jar, i had to write the path of the function like this "package.Class.Method", in my case for example was:
com.certuit.utils.RomanNumeral.roman(1)
com.certuit.utils 是程序包.
RomanNumeral 班级
罗马(1)是我要使用的方法
这对我有用.
这篇关于无法解析为Jaspersoft Studio类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!