How Do I Create A Global Style for All Cognos 10 Reports?

假如想象 提交于 2019-12-08 06:27:37

My approach to customizing the UI is significantly different - imagine me coming into a company where they've been doing the same thing for 6+ years and I want to start changing everything around. It was met with some resistance, so I hope my experience can help you get started.

I come from a strong UI-based background and immediately wanted to contribute my knowledge to the reports we were designing. That required tact, as I wanted to show the value of a well-designed UI without shocking/scaring everyone that uses it (change adversity and the like). I handled this by working within the reports, not on the Cognos files themselves.

The minute you start working with the core files, whether they be CSS, Javascript, or CGI itself, there's an immediate and glaring risk that it will entirely break on upgrade. I got around this by creating HTML items in my reports and calling resources from there. For example, this HTML item is in virtually every header of my reports:

<link type="text/css" href="cognos8/common/css/ui-lightness/jquery-ui-1.8.5.custom.css" rel="Stylesheet" />
<link type="text/css" href="custom.css" rel="Stylesheet" />
<script type="text/javascript"
 src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript"
 src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.min.js"></script>
<script type="text/javascript">
jQuery.noConflict();
jQuery(document).ready(function() {
}); // End Ready
</script>

So now I've got access to jQuery, the UI Framework, and everything else. I specify overrides in my custom.css and build my look from there. This might seem cumbersome, but IBM has a knack for upgrading major versions and completely wiping out naming conventions and functions, so if your CSS selector is off, it "defaults" to IBM's original style.

This is just how I've had to get around it and I'm not sure entirely that it's the best way. I've been working with what I have, which is no access to the server files or anything like that. Just consider this a super-safe approach.

I'm working with Cognos 10.1 now and getting ready for launch. The way I'm handling the installation, configuration and any tweaks is the an auto build/configure process that pulls data from a revision control system. This way even when upgrading I don't loose any customization and can easily merge in changes from the upgrade.

You can absolutely change the look and feel of crosstabs and lists using the support Cognos skinning system. I've done a complete look-and-feel overhaul of Cognos for a previous employer which including changing the way dynamic elements looked.

If you look at the default styles in the GlobalReportStyles.css, all of these styles can be over-ridden in custom CSS files in your skin. That method would be safer than modifying the GlobalReportStyles.css directly as a custom skin directory will not be modified by an upgrade but the global stylesheet surely will be.

Unfortunately, you can't be certain that any modifications you create via the skin facility will render exactly the same way from version to version. Cognos could rearrange the UI or tweak the general appearance enough to break your changes. However, this is the only way I know of to effectively create universal, automatic look and feel modifications to the default Cognos objects.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!