[xsl] Pivot Reports

Subject: [xsl] Pivot Reports
From: Vitaliy Paykov <vpay@xxxxxxxxx>
Date: Thu, 18 Jan 2007 14:06:38 +0200
Hello all!

We met a strange problem with XML transformation.

Let us describe our task first:
We need to generate complex xml based reports which could contains multiple crosstab parts.
We have next requirements:


 1. Each crosstab could contains arbitrary number of rows and columns.
 2. Crosstab report can include other crosstabs
 3. Position of the crosstab is unknown  on design phase (user can
    build complex report using already designed blocks. crosstab is
    the one of the blocks)
 4. The highest level of XSLT is hardcoded so we can't change it for
    every report
 5. Each block have its own unique ID
 6. Several blocks can contain same columns and/or rows

Ours assumptions:

 1. Key tags for all crosstabs are standard (<item> - atomic set of
    information, <row> - name of the item's row, <col> - name of the
    item's col, <val> - value of the item)
 2. Combination of the row and the col is unique in scope of the block
 3. Source data doesn't cover all the combinations of rows and cols.
    So missing items should be interpreted as - or 0

Problem is the next:
First block is generated absolutely correct, all the next blocks contain only combinations of rows and cols which haven't been met in any of already generated blocks.


Sample:

We need take this
_____________________________
*     | C1    | C2   | Total |

Current Thread