cancel
Showing results for 
Search instead for 
Did you mean: 

java结合rpt文件出的异常,我对rpt不是很懂,搞了很久无解!!里面有异常信息

Former Member
0 Kudos

大家帮我看看有什么办法,提供个思路,谢谢!

Caused by: com.crystaldecisions.reports.formulas.FormulaException: 公式u201C{@Record_Selection}u201D的u201C{@MinDateTime} to {@MaxDateTime}u201D处出现异常:

此处需要有一个数字或者货币范围或数组。

at com.crystaldecisions.reports.formulas.j.a(SourceFile:3526)

at com.crystaldecisions.reports.formulas.j.a(SourceFile:3498)

at com.crystaldecisions.reports.formulas.j.b(SourceFile:2222)

at com.crystaldecisions.reports.formulas.j.a(SourceFile:200)

at com.crystaldecisions.reports.formulas.c.for(SourceFile:1225)

at com.crystaldecisions.reports.formulas.j.a(SourceFile:250)

at com.crystaldecisions.reports.formulas.j.do(SourceFile:74)

at com.crystaldecisions.reports.formulas.c.void(SourceFile:70)

at com.crystaldecisions.reports.formulas.r.a(SourceFile:90)

at com.crystaldecisions.reports.formulas.FormulaInfo.a(SourceFile:570)

at com.crystaldecisions.reports.formulas.FormulaService.compile(SourceFile:347)

at com.crystaldecisions.reports.reportdefinition.FormulaCompiler.a(SourceFile:139)

at com.crystaldecisions.reports.reportdefinition.FormulaFieldDefinitionBase.compile(SourceFile:928)

at com.crystaldecisions.reports.reportdefinition.o.a(SourceFile:1360)

at com.crystaldecisions.reports.reportdefinition.o.a(SourceFile:1318)

at com.crystaldecisions.reports.reportdefinition.o.nR(SourceFile:2768)

Accepted Solutions (0)

Answers (4)

Answers (4)

0 Kudos

学习先,多谢!

Former Member
0 Kudos

本身rpt文件里面的公式有错误,类型不配对,修改回去就好了

Former Member
0 Kudos

我知道了,是那个rpt设计有问题,因为我自己重新尝试做rpt,直接预览的时候也是这样报错!!谢谢哈!!

Former Member
0 Kudos

你好,呵呵

请教您一个问题啊,多多指教哦

我是通过设计器设计的rpt文件,设计rpt文件时使用了一台数据库服务器的数据源,在jsp代码里显示报表的。

但我想把这些rpt文件和jsp代码放在另外的客户机,数据库服务器换了机器,那么在jsp中如何让修改rpt文件的数据源信息呢?

我知道直接打开rpt文件更换数据源是可以的,但不想这样,在jsp代码中如何让修改啊?

谢谢

sunny_zhang
Active Contributor
0 Kudos

可以另开帖子来探讨这个问题。。。

Former Member
0 Kudos

>

> 大家帮我看看有什么办法,提供个思路,谢谢!

>

>

> Caused by: com.crystaldecisions.reports.formulas.FormulaException: 公式u201C{@Record_Selection}u201D的u201C{@MinDateTime} to {@MaxDateTime}u201D处出现异常:

> 此处需要有一个数字或者货币范围或数组。

> at com.crystaldecisions.reports.formulas.j.a(SourceFile:3526)

> at com.crystaldecisions.reports.formulas.j.a(SourceFile:3498)

> at com.crystaldecisions.reports.formulas.j.b(SourceFile:2222)

> at com.crystaldecisions.reports.formulas.j.a(SourceFile:200)

> at com.crystaldecisions.reports.formulas.c.for(SourceFile:1225)

> at com.crystaldecisions.reports.formulas.j.a(SourceFile:250)

> at com.crystaldecisions.reports.formulas.j.do(SourceFile:74)

> at com.crystaldecisions.reports.formulas.c.void(SourceFile:70)

> at com.crystaldecisions.reports.formulas.r.a(SourceFile:90)

> at com.crystaldecisions.reports.formulas.FormulaInfo.a(SourceFile:570)

> at com.crystaldecisions.reports.formulas.FormulaService.compile(SourceFile:347)

> at com.crystaldecisions.reports.reportdefinition.FormulaCompiler.a(SourceFile:139)

> at com.crystaldecisions.reports.reportdefinition.FormulaFieldDefinitionBase.compile(SourceFile:928)

> at com.crystaldecisions.reports.reportdefinition.o.a(SourceFile:1360)

> at com.crystaldecisions.reports.reportdefinition.o.a(SourceFile:1318)

> at com.crystaldecisions.reports.reportdefinition.o.nR(SourceFile:2768)

从Exception的描述来看很明显是公式的语法有错。我猜测你是在用代码来生成公式,是吗?

你把Record_Selection,MinDateTime和MaxDateTime这三个公式的内容(或者你想用代码生成的内容)贴上来看看。