Skip to content
September 26, 2013 / Tiago Epifânio

BI Publisher – Best Practices for Modeling RTF Templates – Part 2/2

This post is the follow-up to the original post BI Publisher – Best Practices for Modeling RTF Templates – Part 1/2.

Never use Internet Explorer to edit your Data Model

Not only because you have better browsers than that (I won’t try to explain why in this blog) but because you will most certainly have bad surprises. You will get errors when trying to run your data model (or report) and they will only get fixed when you redo all Links/Group Links in your data model. Which kinda sucks, by the way.

I’ve been using Firefox and Chrome and these bug never occur.

Turn off the auto run option

Let’s face it. If your database isn’t crowded yet, it will be in the future. Chances are that you will have bazillions of records in just a few days/weeks/months.

What happens when you try to open a report that will load bazillions of records? My guess is it will take a long long time to load with a probability for out of memory/disk space error.

The problem is that when you click on the “Open” link of a report, it will run automatically before you can even fill in some filters. What you need to know is that there is an option in the report properties which tells Publisher to auto-run the report when you click open. This option defaults to True and you should change it to False:

  1. Find your report in the Catalog
  2. Click Edit:

    Edit report

  3. Click Properties
  4. Deselect the “Auto Run” option and click OK:

Auto run

Create a maximum records parameter

This is related to the previous tip. Even if you have the auto run option turned off, after you have opened the report there are some actions that you can do that will automatically run the report. For instance:

  1. If you switch to another template:
    Switch template
  2. If you switch the output format for your report:Switch output format

To avoid this, go to your Data Model and create a parameter that will set a maximum number of rows your query will return.

For instance, create a parameter called max_rows, set its default value to 10 or 100 or whatever you like, and then use it in your main query like this:

WHERE :max_rows is null or :max_rows >= rownum

The “:max_rows is null” part makes the query return all rows if the parameter is not filled with any value.

Validate Template

Always click on “Validate Template” (BI Publisher plug-in for MSWord) before uploading your template to your site. It won’t check every single detail in your template but it will warn about some basic issues like forgetting to close an xml tag. At least you will not waste time checking your log files for this simple errors.

RTFM

You always should read the er… friendly manual. But chances are that you won’t. So, keep track of the useful resources you find online.

I always keep this page open in one tab in my browser:

Creating RTF Templates Using the Template Builder for Word

 

Cheers.

 

Link to the first part of this article: BI Publisher – Best Practices for Modeling RTF Templates – Part 1/2.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: