Birt报告设计在运行报告时验证报告参数 [英] Birt report design validating report parameters while running the report

查看:226
本文介绍了Birt报告设计在运行报告时验证报告参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在WebViewer中运行报表时验证报表参数。我使用eclipse设计报告。我使用日期字段和一些选择框作为参数。但是我的要求是 - 用户不应该输入日期,他应该从日期选择器(jquery UI)中选择日期,在选择框中,我想在服务器端进行某种验证,这是从类别选择框不应大于到类别选择框。我需要在服务器端进行ajax调用的验证。有没有办法自定义对话框来获得这个功能,或者我应该设计新的页面来做到这一点,并在验证之后链接该报告。

How to validate the report parameters while running the report in WebViewer. I am using the eclipse to design the reports. I am using the date fields and some select boxes as parameters. But my requirement is - user should not type the date, he should select the date from date picker(jquery UI) and at select boxes I want some kind of validation at server side that is From Category select box should not be greater than To Category select box. I need to do this validation at server side with ajax calls. Is there any way to customize the dialog box to get this functionality or I should design new page to do that and link that report after validation.

我还需要导出功能我的页面,如果我想要如何传递所选参数(导出格式,页面,自动)来报告。

I need export functionality also in my page, if i want that how to pass the selected parameters(Export Format, Pages, Auto) to report.


推荐答案

1验证选择框参数

对于选择参数的验证,您可以使用级联参数组。

For the validation of your Select Parameters, you could use a Cascading Parameter Group.

首先创建一个数据集,返回from Category可能的值。然后,您需要一个新的级联参数组并选择多个数据集添加一个新的参数(您的来自Categroy Prameter )并选择刚刚创建的数据集显示。

First you create a Data Set that is returning the possible values for your "from Category". Then you reate a New Cascading Parameter Group and select Multiple Data Set add a new Paramter(your "from Categroy Prameter") and select the just created Data Set to display.

关闭现在的参数组,并创建一个第二个数据集,它将返回到类别的可能值。在这里,您可以使用刚刚创建的级联参数组的来自分类参数的输入,以限制要显示的结果。

Close the Parameter group for now, and create a second Data Set that is returning the possible values for your "to Category". Here you can use the Input of your "from Categroy Prameter" form the just created Cascading Parameter Group to limit the results to display.

现在返回到级联参数组,并根据您的第二个数据集添加第二个参数。确保这两个参数都被配置为列表框。

Now go back to your Cascading Parameter Group and add a second Paramter based on your second Data Set. Make sure both parameters are configured as List Boxes.

如果您现在为从类别选择一个值,则动态更新的允许值将被动态更新。

If you now select a value for your "from Category" the allowed values for "to Category" will be dynamically updated.

2导出导出格式的输入参数

要导出输入参数,只需将其拖放到报表页面即可。参数可以在每个表达式字段中显示,绑定 params [parameterName] 。如果您只想显示有限类型的导出格式(例如,显示为.xsl,但为.html隐藏),请在属性编辑器中选择可见性选项卡,并为特定输出选择隐藏元素并选择您要隐藏该字段的格式。

To export your input parameters simply add them by drag and drop to your Report Page. Parameters can be displayed in every Expression Field with be binding params["parameterName"]. If you just want to display them for a limited kind of Export Formats (e.g. display in .xsl but hide for .html) select the visibility Tab in the Property Editor and select "hide Element" "for specific outputs..." and select the format where you want to hide the field.

3 Datepicker输入

我没有看到提供BIRT要求的插件。您可以编辑正在使用输入参数的 .jsp ,但这里您自己。我会推荐显示日期的输入格式 dd.MM.yyyy 以减少打字错误。

there is no plugin that I know that is providing the Requirement to BIRT out of the box. You can edit the .jsp that is taking the input parameters but here you are on your own. I would prefere to display the Input-Format of a date e.g. dd.MM.yyyy to reduce typo errors.

这篇关于Birt报告设计在运行报告时验证报告参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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