Crosstab in group band
I'm using RB 14.08b48.
Is it possible to have the CrossTab be rebuilt by group? By default, it
just generates the CrossTab using the entire dataset, but I need it to
be limited to the data contained in the group, and then have the
dimensions and counts counts reset for the next group.
So a simplified data set of
Name Y Value X Value Grid value
A 0 0 0
A 0 .25 1
A .25 0 0
A .25 .25 0
B 0 0 1
B .5 0 0
B 0 .5 0
B .5 .5 1
With a group band on 'Name' (with new page on group change) would have
two pages, like:
X
Y 0 .25 Total
0 0 1 1
.25 0 0 0
Total 0 1 1
X
Y 0 .5 Total
0 1 0 1
.5 0 1 1
Total 1 1 2
Thank you
Is it possible to have the CrossTab be rebuilt by group? By default, it
just generates the CrossTab using the entire dataset, but I need it to
be limited to the data contained in the group, and then have the
dimensions and counts counts reset for the next group.
So a simplified data set of
Name Y Value X Value Grid value
A 0 0 0
A 0 .25 1
A .25 0 0
A .25 .25 0
B 0 0 1
B .5 0 0
B 0 .5 0
B .5 .5 1
With a group band on 'Name' (with new page on group change) would have
two pages, like:
X
Y 0 .25 Total
0 0 1 1
.25 0 0 0
Total 0 1 1
X
Y 0 .5 Total
0 1 0 1
.5 0 1 1
Total 1 1 2
Thank you
This discussion has been closed.
Comments
The crosstab component will independently traverse the entire dataset it
is connected to. In order to split a single crosstab into separate
groups, you will need to set up a master-detail relationship with your
data in two datasets. The report will be connected to the master
dataset and the crosstab will be connected to the detail.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
bit longer to run. I've changed my report's data pipelines so that my
original query is now split into a master/detail relationship. But, the
original query is somewhat large to begin with (there's about 8 nested
queries to get to the name of 'A' and 'B' in my original exmaple).
Running the query once isn't that big a deal - 20-30 seconds or so. But
it looks like it's rerunning the detail query on each master query
record change, rather than selecting the records based on matching
linked records. That adds significantly to the runtime (since in
reality, there's anywhere between 50-200 master records.
Can the child data pipeline ever be set to run once, and it would
instead iterate through the matching records (if my original guess that
it's rerunning the detail query again is true)?
like this (I also see the manual vs. parameterized SQL, in the link
options, though I couldn't get the manual to actually work).
A followup question on the CrossTab - is there a way in RAP to remove a
dimension after having traversed all the records? I have counts for A's
and B's, and in some cases, there won't be any B's, in which case I want
to remove the Sum of B's value dimension. Setting its visibility to
false doesn't actually hide the column, or at least not at the point at
which I'm doing it. But I'm not certain of the necessary timing.
The Crosstab renders as the data is traversed so it would not be
possible to "hide" certain dimension values after the data has been
accessed.
You can set your dimension value to Skip When Null in order to remove it
when there is no available value.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com