Quando omni flunkus, mortati. Die dulci fruere.

| Subscribe via RSS

Tuesday, March 24, 2009

Cognos on the iPhone?

| 1 comments


Built a couple of the report samples out to an iPhone emulator yesterday. Even out-of-box the viewer looks pretty decent. The Cognos Viewer navigation buttons are manageable but would be obviously better if specifically designed for the iPhone.

Oracle and MicroStrategy BI both have offerings now for the iPhone so I'm sure we can expect it is only a matter of time until IBM Cognos picks this up.

(Click the image to see it larger)

Thursday, March 19, 2009

Drop down lists: Customize label

| 0 comments

After creating a simple list in Report Studio you may want to create a drop down parametrized filter for it. First thing you'll notice when run the report is that the default selected text on the drop down is always set to the first field name of the list. I had requests to make this a little more representative, to something like 'Select field...' or 'Choose something...' which would give the user an indication that there were more choices available in the drop down.

To solve this issue, I found 2 techniques:

First is to create a static choice with the right correct display value for this prompt and set the default value to this static choice's value. Obviously this won't prevent the user from seeing the first line when he opens the drop down list.

The second technique would harness the following Javascript code. Drag a new html item into the report and include the following:

<script language="javascript">

var x = document.getElementsByTagName('select');

var RN_SelectClass = "clsSelectControl pv";

var is_Required;

for (var i=0;i 1) {
switch (x[i].options[0].text) {
case 'parameter1': x[i].options[0].text = 'NewLabel1'; break;
case 'parameter2': x[i].options[0].text = 'NewLabel2'; break;
default: x[i].options[0].text;
}
}
}
</script>



Next, change the parameter and NewLabel in the above syntax to suit your required label name conventions.

Wednesday, March 18, 2009

IBM is looking at Sun

| 0 comments

There is breaking news that IBM is in talks to buy Sun Microsystems according to a report in The Wall Street Journal. This could be good news for the open source community especially with projects like Open Solaris. Also - IBM is heavily into Java and development of products using Java so I can see a real benefit in this area for them. Not sure what this does to Sun's recent cloud announcement...

Is $6 billion too much?

Monday, March 2, 2009

Need PDF with Digital Signature?

| 0 comments

I was surprised to learn that there is no internal functionality to digitally sign a PDF file rendered by Cognos. I would expect that this would be a necessity for most Banks or financial institutions. After a quick bit of research (and some Google searches) I came up with one out-of-the-box method which might facilitate. The method in theory goes like:

Step 1: have the burst report run and save the output to filesystem in PDF format. Step 2: use a 3rd party software to process (digitally sign) the output file.

For step 2 I found something called "iText" (http://www.lowagie.com/iText/) which uses a Java JDK to post-process and add the digital signature to a PDF file.

I plan on investigating this method further but I'm interested in feedback or additional insight.

Thursday, February 26, 2009

Using Relative Dates In Business Reporting

| 0 comments

Here's an interesting example / tutorial / technique for using relative dates in Cognos Report Studio as well as the scheduling of such reports. In this example the report administrator would setup a report that would display activity for the past week that would run every Monday morning: Relative Dates In Business Reporting

Examples of relative dates that many organizations might use are activity in the last 7 days, Month to date (MTD), Year to Date (YTD) to name a few.

Wednesday, February 11, 2009

Prompt date formats

| 0 comments

In Cognos, date formats used in prompts are controlled by the locale settings. Although the locales each have their own format for dates you can change the format of the prompt date for your desired locale.

In the directory ...\cognos\c8\webcontent\prompting\res are two files called promptLocale_.js and promptLocale_.xml.

In these files you can see the date formats used for each locale. For example, if you want to use the en-us locale within Cognos 8, and you prefer a different date format for the prompt you can easily edit the promptLocale_en-us.js and promptLocale_en-us.xml files to change the medium date format. Let's say that you prefer to use the date format of yyyy-MM-dd, you'll just need to do the following:

In the promptLocale_en-us.js file,
  • Change the value for g_mediumFormat to this: yyyy-MM-dd h:mm:ss a
  • Change the value for g_mediumFormatDateOrder to this: YMD
  • Change the value for g_monthFormatMedium to this: MM
  • Change the value for g_dayFormatMedium to this: dd
In the promptLocale_en-us.xml file, change the following 4 properties to reflect the changes below:
  • yyyy-MM-dd h:mm:ss a
  • YMD
  • MM
  • dd
Always make sure you backup these files before any changes are made.

Monday, January 26, 2009

Freeze rows and columns on Report Studio crosstab

| 0 comments

I had a request recently by a business user who wanted to know if Cognos could freeze the header rows and columns of a crosstab (an Excel-like functionality). I found a fairly simple technique on how to accomplish this.

Steps:

  1. 1. Add two blocks on a blank report page.
  2. 2. Add a table with one cell and one row in the top block (assuming the report contains only one column).
  3. 3. Add a list on the lower block, and a data item from the model (order number).
  4. 4. Select the page, and associate the Query to the page.
  5. 5. Drag a text item in the cell of the table (in the top block).
  6. 6. Select the text item, and in the properties under query items, select order number (see step 3) and content as Label.
  7. 7. Select the second block containing the list.
  8. 8. Under Properties, Positioning, Size and Overflow, set Height = 12 cm and select Use scroll bar when necessary.
  9. 9. Select the Order Number column title in the list. Set its Box Type properties to None.