If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Can templates work like CSS?

Started by Adrian, 01 Aug 2013 11:24:20 AM

Previous topic - Next topic

Adrian

In Report Studio (Cognos 10) is there a method by which any reports created from a template are automatically updated with any changes to the original template? i.e. like a cascading style sheet would work
(e.g. if our company's corporate colours changed I could change the master template header from blue to green and all existing reports magically change too?)

Maybe it is not templates I need to be investigating but a different feature...?

Or is there no such feature and it is wishful thinking on my part?

CognosPaul

I hope you don't have too many to update. I had a client who had close to 3k reports, many with slightly different variations on the logo. The variations made using the bulk updater difficult to use.

Cognos does have a standard way of doing this. First, create a new report - call it templates. This will contain all of the objects and templates that will be referenced in other reports. I generally save it into a hidden folder called "Components Library".

Drag in a block, and give it a name. Create your standardized header in here. If the individual reports need to have variations, such as if the report author might need to change a text item, drag a text item to that place and give it a name. Save the report.

In a new report (or one that you're updating) drag in a Layout Component Reference from the toolbox. The target should be a different report, browse to the templates report that you created earlier. It will give you a list of every named object in that report. Select the block containing the header. If you added named text items, note that you can select those to override them. This will allow a report author to add their own customizations to the header. When you update the original this will update the object in the new report.

This means that every time the report is run, it will do a quick check against the component library. In a heavy usage environment this can cause some slowdowns. You can set the layout component to be a copy instead, which will not update when the source is. Instead, you have to choose to update it.

Adrian

Thanks for your response, much appreciated.

Thankfully we do not have anything like 3k reports, maybe a few dozen corporate and category team reports,  Any reports developed by users themselves will be left for them to re-create if they are still required.  However, there was no real management of the corporate reports so there can be different styles applied depending on the author.  The launch of a new Data Warehouse is instigating a consolidation of our existing reports and better planning.  I am keen to do things a little more intelligently, hence this post! 

You mentioned "In a heavy usage environment this can cause some slowdowns. You can set the layout component to be a copy instead, which will not update when the source is."  I understand that, but then you said "Instead, you have to choose to update it." Does than mean any changes to the formatting will cascade to the report but only when you choose the report to be updated?  (i.e. change the template, then 1 month later after the report has been run a few times since the template update you can choose to have the changes cascade down to the report?)

If so, after you make changes to the template what do you have to do to then choose to update a report? (are you given an option when you run it or do you have to go into the settings of each individual report, or something else?)

CognosPaul

I think that it works like this (any IBM employees care to correct me?):

The components are entered into a cache. Reports can pull those elements at run time of the report, necessitating additional meta callbacks to the Content Store, or they can simply copy the XML of the component. If it's a copy, the XML of the component will be part of the report XML, meaning no extra callbacks. In Report Studio there is an option to "Update Component Copy" which will retrieve the latest version.

There is probably a way to run a batch job to update the components, I haven't needed to do it though so I can't give a concrete answer. I'll check when I go back to work Sunday.

Personally I recommend using the reference instead of copy. Unless you have hundreds of simultaneous users (such as global enterprises) the extra callback is negligible.

Adrian

Just ran through your advice on how to use Layout Component Reference and it worked a treat!  ;D

Thank you very much indeed.

I do not think I need to worry too much about a batch update but it would be nice to know about ti if it can be done.

MFGF

Quote from: PaulM on 02 Aug 2013 03:31:46 AM
I think that it works like this (any IBM employees care to correct me?):

The components are entered into a cache. Reports can pull those elements at run time of the report, necessitating additional meta callbacks to the Content Store, or they can simply copy the XML of the component. If it's a copy, the XML of the component will be part of the report XML, meaning no extra callbacks. In Report Studio there is an option to "Update Component Copy" which will retrieve the latest version.

There is probably a way to run a batch job to update the components, I haven't needed to do it though so I can't give a concrete answer. I'll check when I go back to work Sunday.

Personally I recommend using the reference instead of copy. Unless you have hundreds of simultaneous users (such as global enterprises) the extra callback is negligible.

That's my understanding too, Paul. I don't imagine anyone from IBM will be along to correct you :)

I'm not aware of any batch utilities to update embedded component references. It would probably be a Content Maintenance task if it existed, but if it does, I don't know about it. I'm sure a clever developer could write a bit of funky code using the SDK if they felt so inclined...

MF.
Meep!