This document presents an overview of the problems found during developing an BI project, which generates only Excel reports. I also propose some solutions to the addressed problems. Have in mind that those solutions are not working for other formats that BIP can handle, like PDF, HTML, etc.
We developed reports only for Excel formats, for this we initially encounter the following problems:
- adding to RTF template excel formulas, e.g. =A1 + B1;
- creating dynamic formulas that depends on the number of rows or columns dynamically created before applying this formula;
- number formatting of cell was not very helpful because BIP was rounding values instead of applying the excel formatting (which holds the real value behind and only display a formatted value);
- BIP doesn’t have a library of functions that can easy the work for creating excel reports, such a library should contain functions like: get cell coordinates in excel format (e.g.
AA1);
- BIP is missing other features from excel like: printing layouts, frozen panes, cell comments, row grouping.
Limitations found when developing RTF templates:
- For very large tables that are not dynamically created, rather static in the RTF template, we encounter that there is a limit of table width. The following use case shows when this happens:
Use case: Create a table in RTF that have some content, the table must be of size: 22’’ (inches) and try to add new column, the following error message appears:
This exceeds the maximum width.- Fields that represents reference to nodes or XSLT code cannot allow more than 390 chars inside.
The problem of using excel formulas I solved by placing the excel formula inside the RTF template like: =A1+A2. This is interpreted by Excel and will compute the formula accordingly.
Creation of dynamic excel formulas is solved by using variables or XML groups value which can indicate the number of rows/columns that were created a need to be considered in computing the formula text. The following shows an example, this use an extension that we implemented, see later in document about extension through Java functions:
<xsl:variable name="start_row" select="'6'"/>
=<?excel:cell(($G1/MONTH - 4) * 3 + 3 + $start_row,2)?>+A2