Monthly Archives: April 2014

WebFOCUS: Number of Rows Returned

In some cases, you may want to know the number of rows returned when you HOLD a TABLE. After your END statement in your block, you can use &LINES. For Example

-*show the number of rows returned in the console

-TYPE ‘Rows Returned’ &LINES

-* jump to a different block of code if no rows returned


If you’re looking to get the number of rows as part of the hold file, then you can do something like this:


“Total Rows: <TOT.ROW_COUNT”


Website Operations Dashboard


I presented a data visualization and dashboard design workshop back in November of 2013 with a colleague of mine at the Information Builders Toronto office. In the presentation, I showed off a dashboard design that incorporated some of the concepts that we taught in the workshop.

My colleague and I will be presenting the workshop at Information Builders 2014 User Conference on Monday June 9th from 2:00PM to 3:00PM. Hopefully, you will have a chance to join us.

For those who are interested, I have an implementation of the dashboard in WebFOCUS. I have used multiple techniques here to demonstrate the flexibility of WebFOCUS. The three main techniques I’ve used in my implementation:

  • Out-of-box GUI driven implementation
  • Gadget approach
  • Use of jQuery plugins

Running the application

There are several steps to ensure that the dashboard will run. This section will walk you through them.

Step 1: Setup

    • Create an application folder on your Report server called website-ops

Download these files download icon and place them in your website-ops application folder on the Report Server

  • I am assuming that your WebFOCUS Client (web server) has a folder called “baseapp”; this is where all the web assets will be stored including css files, javascript files, and images.
  • Download these files download icon and place them in your baseapp folder on your web server.
  • You have the ability to upload Excel files and create synonyms off of them; if you don’t, you’ll have to be creative in how you get the sample data in.

Step 2: Running the dashboard

In the website-ops app folder, look for the file called web_ops_dashboard_clean.htm and run that. If you get 404 errors, you may have to do the following:

  1. Open it in HTML Composer
  2. Look for an element called btn_run using the top right drop down list and select that
  3. Change the display property to ‘not set’
  4. The button should appear below the dashboard
  5. It should already be selected; if not, do so
  6. Right click on the button and select the Hyperlink Properties menu item
  7. Re-create the links – the iframe has been named to make it obvious which fex file you should hook it up to

This is what your dashboard should look like:

website operations dashboard

If you are still having problems with getting this to run, shoot me an email at:

WebFOCUS Developer Studio: The JSCOM 3 Error

JSCOM 3 is part of the Java library and enables various features in the WebFOCUS platform; for example, it provides a way to upload Excel data through the Report Server and automatically creates a synonym for it.

It took a while to find what I needed to address the problem as I haven’t touched Java in a very long time, but here’s how to fix it if you are doing development on a Windows machine.  Make sure you have the Java development kit environment installed on your development machine. You can get the installs here if you don’t have it:

Jave Development Kit

Technically speaking, you could install the Java Runtime Environment, as well; but I have only tested this fix with the JDK.

Once you have that installed, you have to add an Environment Variable to Windows. If you don’t know how to do that, you can follow this article at your own risk.

You need to add a System Variable called:

JDK_HOME = [location of jdk]

In my case it was: C:\Program Files (x86)\Java\jdk1.6.0_25

Next time you load up Developer Studio, your JSCOM 3 error should be gone; if not, I would recommend contacting IBI technical support.

Here’s a more comprehensive article on how to address this.

UPDATE: Make sure to install the Java Runtime Environment or the JDK and create the paths before installing the server. With WF8 server, it couldn’t find the path. However, when I reinstalled it, it was fine.

Finally, if you installed the x64 version of the Report Server, then you will need to reference the x64 version of the JVM.

WebFOCUS: Simplifying Date Formatting

If you’re a software developer using popular languages such as C# and Java, you’re used to a lot of string formatting options for dates.

For example, in C#, this line of code will look familiar.

DateTime thisDate = new DateTime(2014,1,1);

string date_str=thisDate.ToString(“MMMM dd, yyyy”);

The variable date_str will look like this: January 1, 2014

Unfortunately, I wasn’t able to find something similar in WebFOCUS. There a lot of date functions to choose from, but that’s a double edge sword; you can do a lot of with dates which gives you flexibility, but it can be confusing when to use what functions and makes it difficult to remember.

I created a custom function that simplifies this task of turning dates into strings (ALPHAs). You can download this WebFOCUS date utility. Download WebFOCUS date utility file

Here’s an example of how you can use it:

-INCLUDE date_utils.fex

COMPUTE DATETIME/HYYMDs =‘2014-01-02 23:58:59’;

COMPUTE DATE/YYMD = ‘2013-01-03’;
Here are all the available formats you can use in my custom function – everything is case sensitive!
YYYY = four digit year; e.g. 2014
YY = two digit year; e.g. 14
MMMM = full month name; e.g. February
MMM = three letter month name; e.g. Feb
MM = two digit month padded with a 0; e.g. 02
M = varying 1-2 digit month; e.g. 2
DD = two digit day padded with a 0; e.g. 01
D = varying 1-2 digit day; e.g. 1

Of course, much more can be done, but this covers the majority of the use cases that I typically run into.

Feel free to extend as you need. If you need help, extending the functionality, shoot me an email at: