我已将报告从Cognos 10.2.2迁移到Cognos“ 11.0.13.1 LTS”版本。迁移到11后,管理提示页面的Java脚本当前已损坏。这在10.2.2上运行良好。 是否对Cognos 11进行了某些更改,或者我们正在使用的某些功能已过时或类似。任何绳索对诊断问题都非常有用。 我们还向IBM发出了一张罚单,以确认发生了什么事情
我们尝试编辑代码,并以不同的方式对代码进行格式化,但仍会得到相同的行为。
def is_palindrome(mystring):
# The "//2" here divides by 2 and ignores the remainder. So if
# there are an even number of letters, we'll test each pair. If
# It's an odd number, then we don't care about the middle character
# anyway. Compare [0] to [-1], then [1] to [-2], [2] to [-3], and so on.
for position in range(0, len(mystring)//2):
# If we've found a mismatched pair of letters, then we can
# stop looking; we know it's not a palindrome.
if mystring[position] != mystring[(-1 * position) - 1]:
print("This is NOT a palindrome")
return # This breaks you out of the entire function.
# If we've gotten this far, then the word must be a palindrome.
print("This is a palindrome")
# Here's where we run the command to input the string, and run the function
mystring = input("Enter your string: ")
is_palindrome(mystring)
我希望在选择ID中的任何元素时禁用第二个列表“ SID”。
答案 0 :(得分:1)
我认为“ FormWarpRequest”是Cognos 8的保留。它可能在Cognos 11.0.x中不起作用。您应该在Cognos 10.2.2(https://www.ibm.com/support/knowledgecenter/en/SSEP7J_10.2.2/com.ibm.swg.ba.cognos.ug_cr_rptstd.10.2.2.doc/r_prmpt_api_cognos_report.html#cognos.report)中使用cognos.Report.getReport("_THIS_");
。这在Cognos 11.0.x中仍然应该起作用,但是您将要开始使用RequireJS(请参阅https://www.ibm.com/communities/analytics/cognos-analytics-blog/updated-javascript-samples-for-ibm-cognos-analytics-11-0-10/和https://public.dhe.ibm.com/software/data/sw-library/cognos/mobile/scriptable_reports/index.html)并使用运行以完全交互性运行<< / em>属性设置为是即可利用新功能。