如何使条件格式适用于我的 Cognos 报告
我在 Cognos 8.3 中有一个简单的列表报告。我有一个包含类似内容的字段:
ETLJobX Completed - SUCCESS
ETLJobY Completed - FAIL
ETLJobZ Completed - SUCCESS
ETLJobA Completed - SUCCESS
ETLJobB Completed - FAIL
我有一个条件格式化程序,将成功标记为绿色,将失败标记为红色。工作完美。在字符串中使用条件“包含”SUCCESS 或 FAIL。
如果我更改数据,使一行看起来像这样:
ETLJobX Completed - SUCCESS
Job used in Report X
ETLJobY Completed - FAIL
Job used in Report Y
它不再为该行着色。回车似乎破坏了东西。如果我输入与 : 相同的数据,
ETLJobX Completed - SUCCESS Job used in Report X
使其在一行上,则条件格式工作正常。
有什么方法可以使其在带有回车符的行上工作吗?
I have a simple list report in Cognos 8.3. I have a field with things like this:
ETLJobX Completed - SUCCESS
ETLJobY Completed - FAIL
ETLJobZ Completed - SUCCESS
ETLJobA Completed - SUCCESS
ETLJobB Completed - FAIL
I have a conditional formatter set to color the successes in green and failures in red. Works perfectly. Using the conditions "Contains" SUCCESS or FAIL in the string.
If I change the data so that a row looks like this:
ETLJobX Completed - SUCCESS
Job used in Report X
ETLJobY Completed - FAIL
Job used in Report Y
it no longer colors that row. The carriage return seems to break things. If I type the same data as :
ETLJobX Completed - SUCCESS Job used in Report X
So that it is on one line, the conditional format works fine.
Is there any way to make this work on lines with a carriage return in them?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对我有用的方法(在版本 8.4 上)是创建一个条件变量,如下所示:
position ('SUCCESS', [Query1].[test]) > -1
。将新条件指定为要应用条件格式的列的样式变量。如果表达式包含回车符,则以相同方式使用LIKE
或CONTAINS
运算符似乎不起作用。An approach that worked for me (on version 8.4) is to create a conditional variable like this:
position ('SUCCESS', [Query1].[test]) > -1
. Assign the new condition as the style variable for the column you want to apply the conditional formatting to. Using theLIKE
orCONTAINS
operators in the same manner does not seem to work if the expression contains the carriage return.