Cognos:跨多个页面保留复选框状态

发布于 2024-07-30 09:13:04 字数 330 浏览 1 评论 0 原文

在 Cognos 报告结果页面上,我们需要为每一行设置一个复选框。 该复选框是使用 HTMLITEM 标签设计的。

然而,我们面临的问题是,当我们转到下一页/上一页时,复选框的状态(选中或未选中)不会保留。

我对 Cognos 非常陌生,我需要知道是否有办法做到这一点。

我相当擅长 JAVAScripting 和 JSP,但由于我们只能访问 HTML 元素而不能访问 JSP 标签(Cognos 无论如何都使用 CGI),所以我无法获取请求对象。 我认为,如果有某种方法可以检索先前提交(上一页)的请求对象参数,这将在很大程度上有助于解决问题。

乔纳斯

On the Cognos Report Results Page, we need to have a checkbox for each row.
The checkbox is designed using HTMLITEM tag.

However, the problem we face is that the state of the checkbox (checked or unchecked) is not persisted when we go to the next page/previous page.

I am very new to Cognos and I need to know if there is a way to do this.

I am fairly good at JAVAScripting and JSP, but since we only have access to HTML elements and not JSP Tags (Cognos uses CGI anyways), I cannot get the request object.
If there is some way to retrieve the request objects parameters of previous submit(previous page), that would help in solving the issue to a large extent, I feel.

Jonas

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

别理我 2024-08-06 09:13:05

关于您的最终目标是什么,实际上没有足够的信息来正确地帮助您完成此任务。 有几种方法可以让您在报告上使用 JS 来记住以前检查的项目,但根据您的要求,可能有更好的方法来做到这一点。

如果没有更多细节,首先想到的就是在复选框上选中/取消选中时设置和取消设置一些 JavaScript cookie 值。

请注意,可能有多种其他方法可以实现此目的,包括增加每页可见行数等......

There isn't really enough information on what your end goal is to be able to assist you with this properly. There are a few ways that spring to mind that would allow you to use JS on the report to remember previously checked items, but there may be a much better way to do this depending on your requirements.

Without having more details, the first thing that leaps to mind is simply having some JavaScript set and unset cookie values on check/uncheck on the checkbox.

Note, there could be a variety of other ways to work this, including upping the number of visible rows per page, etc...

2024-08-06 09:13:05

您可以在查询中创建一个数据项,您可以在其中确定是否应选中复选框。 在报表页面上的列表设计中,您可以在列表中呈现 HTMLItem,并使 HTMLItem 基于 DataItem。 您的 HTML 必须类似于

You can create a dataitem in a query where you can determine whether your checkbox should be checked or not. In the design of your list on the report page you can render a HTMLItem within the list, and base the HTMLItem on a DataItem. Your HTML must than be something like

<input type="checkbox" value="""+ [DataItemValueToPass] + """ " + [DataItemCheckedOrNot] ></input>

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文