It is one of the modules that as a consultant we always encourage customers to purchase when they buy Open Text Content Server and that is Web Reports. Apart from being used in a straight forward way (being a presentation layer for LiveReports) it can be used as an all-round tool for Content Server Admins.

Now it is worth saying, that what I am describing below is done so for ‘entertainment purposes’. Applying this into product will without end-to-end system and UAT testing will risk you breaking stuff. It is also worth noting that applying this change will potentially be overwritten by any patches released by Open Text and could cause further headaches down the line should you need to upgrade.

If you performing these changes, it is worth wrapping these changes up into a module using the Customisation Runtime module from OpenText (or just going all out and create your own module).

Now that the disclaimers are out the way, let’s get our chisel and hammer and go to town.

The Problem

There is no point solving a problem for something that no one ever asked for, in this case we were asked to create a customview for Binder objects on a Livelink system using Contracts Management 2.0.2.

The reason for the customview was that the traditional Contract Management ‘view’ looks like this

It consists of three columns:

  • Binder Information
  • Category Meta Data
  • Team Roles & Members

The issues here are numerous:

  • The ‘Binder’ number in first column case would conflict contradicts one that is already in place through a category field
  • The Type and Description are not going be used by the client (because all the important information is on the first column) this takes up screen real-estate and ultimately only leaves the middle column to display important Binder information.
  • Nowhere in any of the columns does it allow you to click through to the Partner Database and view the Contact information quickly (and be able to add additional )

It is worth saying that the third column is perfect for what we need it to do; it will display the key groups and its members very nicely. Ultimately there is not an issue with the overall design, what you get out of the box is great. In practise however it tends to be perfect for the cases where you are designing a process from scratch using Contract Management to build that process (and you are not trying to use this tool to re-engineer an existing process).

So go away and create your Customview and Web Report goodness

So this is the point where you merrily churn away and create your custom view. In this case I was just applying the customview to a folder and getting the data to display correct.

No as a tip, if you would like your customview to access and use a webreports, you can do so using the built-in JavaScript libraries that come with Web Reports. Do to this you need something like this

<script language="javascript1.2">
updatePage( '789789', 'anvil_binder', '&inputlabel1=1234);
<div id="anvil_binder">
<p><img src='/images/ajax-loader.gif'></p>
<p>Please wait...</p>
<p>Fetching the relevant content.</p>

The calls the ajax.js javascript libraries. To execute the following command updatePage( 'object ID of Web Report', 'target div where the WR content will be written to', '¶meter=value of parameter);

The massive spanner in the works

So you have your customview and your webreports working on your test folder so you are ready to put it on a Binder object….you add it…… add it again…..still nothing. What is going on! If you are not supposed to add a customview then don’t allow it as a selectable object.

So what is going on here?

Well the simplest reason is that Binders are not configured to use customviews (some advanced Builder type people indicate that WebDoc:DocNode:Document:Customview:fParentApplTypes is set to Folders (0) and Compound Documents (136)).

So this left me with two alternatives:

  • Create a new module that extends Contracts Management
  • Edit the WebLingo in the HTML and make the call to the Web Report

Honestly the preferred/safest option is to do the former and create the new module. However with the time that I had to accomplish this task I chose the latter. The advantage for everyone else is that you can easily replicate this home and all you need is Notepad++, Content Server and Web Reports.

Hack and Slash

(when hacking and slashing around in WebLingo files, it is important to remember that to make your changes visible, you need to restart the Livelink Server so make sure you double check your logic otherwise you will be in restart hell)

To find the offending HTML I loaded my favourite HTML inspection tool (Google Chrome) to find the piece of HTML. I found that there was a file [OTHOME\module\cmbase_2_0_2\html\tbcfheader.html that was generating the file. However this HTML was being called ultimate from a [OTHOME\module\cmbase_2_0_2\html\ browsetb.html.

Opening the file I found the offending line in the HTML:

;;call ( prgCtx, request, data, section )

Removing this line, removes the building header for Binder objects. So now all we need to do is backup the original file, and inject our own HTML.

Whilst this is fine in principle, there are a couple of things to keep in mind. The WebReport that you are launching requires you to provide the object ID of the Binder. Reading around the web especially through blogs like Greg Griffith’s you find the correct code to enter to get the right value (something like below).

<script language=”javascript1.2″>
ANVL_bndrID = `data.nodeRec.DataID`
updatePage( ‘247367’, ‘logica_client’, ‘&inputlabel1=’+ ANVL_bndrID +’’’);

And then a bit of spit and polish on the CSS and now for all new Binder objects created they have the customview displaying and because of the way it was developed if the client changes their mind as to the format and the content that needs to be displayed we can now do so without any restart. Redacted View of Completed Customview

UPDATE: Because the modification was made using no spacer gif’s and nexted tables the generated (i.e. what gets delivered to the browser) file size drops ~ 10 KB in size (11442 bytes in my case). Food for thought