使用表组件时为什么要创建第一个数据集呢? [英] Why bother creating the first dataset when using table component?
问题描述
我一直在尝试使用Jasper Reports Studio 6.2并且正在努力理解数据集。
I've been trying to use Jasper Reports Studio 6.2 and am struggling to understand the Datasets.
我不明白为什么在创建新报告时要求创建数据集,然后在添加表格时要求创建另一个新数据集宾语。我没有得到第一个...在我看来,与'table'对象的创建相关联的那个将具有SQL查询,并且是数据对象。如果是这样的话,那么在开始时创建一个是什么意思?
I don't understand why I'm asked to create a dataset when I create a new report, then asked to create another new dataset when I add a 'table' object. I don't get the first one... in my mind, the one that's associated with the creation of the 'table' object would have the SQL query, and be the data object. If that's the case, what was the point of creating one at the beginning?
推荐答案
报告的数据源将在报告详细信息区
表的数据源将迭代行在你的桌子上。
The data-source for the table will iterate the rows on your table.
如果报告中只有一张表,你可以
If you have only a table in the report you can
- 传递 JREmptyDataSource 示例
新的JREmptyDataSource(1)
,这将显示详细信息带一次
- Pass an JREmptyDataSource example
new JREmptyDataSource(1)
, this will show detail band once
或
- 将表放入例如
摘要
波段并设置属性在
,然后将没有数据源传递给填充管理器。jasperReport
标记上的whenNoDataType =AllSectionsNoDetail
- Put the table in for example the
summary
band and set the attributewhenNoDataType="AllSectionsNoDetail"
on thejasperReport
tag and then pass no datasource to the fill manager.
为什么两者都有用?,你用来表示的第一个数据使用普通的详细信息
频段,第二个用于显示例如汇总汇总数据的表
乐队
Why can both be useful?, the first you use to show data using the normal detail
band and the second one you use to show for example a table that sums up data on the summary
band
这篇关于使用表组件时为什么要创建第一个数据集呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!