如何在JRXML中构建包含多个查询的数据源? [英] How to build a Datasource with several queries in the JRXML?

查看:157
本文介绍了如何在JRXML中构建包含多个查询的数据源?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要知道如何在jasper报告中动态生成报告?在我的情况下,表具有id,name,design作为字段。我需要在一个jrxml文件中操作五个不同的查询。

I need to know how to generate reports dynamically in jasper reports? In my case table has id,name,design as fields. I need to manipulate five different queries in one jrxml file.

第一个将选择整个表。
第二个将仅选择id,name。
仅限第三个名字。

First one will select the entire table. Second one will select id,name alone. Third one name alone.

在这里我选择了整个表格,但我对如何运行其余表格感到困惑。

Here i succeed with selecting the entire table but am getting confused on how to to run the rest.

推荐答案

在除了由jschoen提出的三个选项,有一个第四选择:

In addition to the three options presented by jschoen, there is a fourth option:

4)使用子数据集在一个报告中运行多个查询。您可以看到答案在一个单一的多个查询jasper文档,了解如何执行此操作。

4) Use subdatasets to run multiple queries in one report. You can see the answer to Multiple queries in a single jasper document to see how to do this.

这篇关于如何在JRXML中构建包含多个查询的数据源?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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