“文档没有页面”在iReport上,OpenReports上没有任何内容 [英] "Document has no pages" on iReport and nothing on OpenReports

查看:119
本文介绍了“文档没有页面”在iReport上,OpenReports上没有任何内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了JasperReports的问题我无法解决。我正在使用Eclipse,OpenReports 3.2和IReport 3.7

I am having an issue with JasperReports I can not solve. I am using Eclipse, OpenReports 3.2 and IReport 3.7

我遇到的问题是报告什么都不做。当我在IReport中预览报表时,我至少可以得到文档没有页面的消息,但是当我尝试使用OpenReports打开它时,它什么也没做。我得到了打开的报告标题和版权信息,但它们之间没有任何内容。

The issue I am having is that the report does nothing. When I preview the report in IReport I can at least get a "Document has no pages" message but when I try to open it using OpenReports it doesn't do anything. I get the open reports header and the copyright message but nothing between them.

我能够在OpenReports的ReportRunAction.java中将其跟踪到第150行。该行是:

I was able to track it down to line 150 in ReportRunAction.java in OpenReports. That line is:

jasperPrint = jasperEngine.fillReport(reportInput);

至少这是页面消失的行。它会跳过该行所在的catch块,但错误是空的。当我尝试打印描述时,它为空。我不能发誓这个问题不是那个参数。通过浏览所有我能够找到的内容是关于如何使用OpenReports使用的相同版本的jasperreports.jar编译报告。我不知道如何判断是什么版本的jasper报告被捆绑到.jasper文件中。

At least that is the line the page dies on. It trips the catch block that the line is inside of but the error is empty. When I try to print the description it is null. I can't swear that the issue isn't that parameter. Through looking around all I have been able to find is something about how the report needs to be compiled with the same version of the jasperreports.jar that OpenReports uses. I have no idea how to tell if/what version of jasper reports is being bundled into the .jasper file though.

这是我的问题吗?如果是这样,我如何告诉/设置捆绑的jar版本?如果不;帮助!

Is that my problem? If so how do I tell/set the version of the jar that gets bundled? If not; help!

推荐答案

当报告没有记录或者您使用错误的过滤器表达式丢弃所有这些消息时,会出现无页面消息。

The no pages messages comes out when the report has not records or you discarded all of them with a wrong filter expression.

您可以尝试以下几种方法:

There are a couple of things you can try:


  1. 将过滤器表达式设置为:

  1. set the filter expression to:

new Boolean(true)

new Boolean (true)

这将以某种方式重置您的过滤器表达式。

This will in some way reset your filter expression.


  • 右键单击您的jasper报告

  • properties

  • 查找更多。 ..

并设置报告属性当没有数据所有部分没有详细信息时,您至少可以看到报告的其余部分。

and Set the report property "When no data" to "All sections no details" so you can see at least the rest of the report.

谢谢。

这篇关于“文档没有页面”在iReport上,OpenReports上没有任何内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆