Remove rows/colums from crosstab based on parameters

mennovh
edited February 11, 2022 in Analytics #1
<p>Hi,</p><p> </p><p>I currently have a report that has a 3x3 crosstab on it.</p><p> </p><p>I need to be able to remove rows/columns dynamically based on parameters. I can hide the fields using visibility expressions but this doesn't actually remove the rows/columns from the crosstab so when viewing the crosstab you still see the border lines from the rows/columns that are blank.</p><p> </p><p>So is there a way to actually remove the a row/column rather then hiding the contents?</p><p> </p><p>I have seen suggestion that you create a crosstab for each scenario and then drop the unused ones but that seems a messy solution to me as I would need to create crosstabs for 1x1, 1x2, 1x3, 2x1,2x2, 2x3,3x1,3x2 and 3x3</p><p> </p><p>Thanks in advance,</p><p> </p><p>Menno</p>

Comments

  • <p>Rows and columns of a crosstab are created based on data in the data set. </p><p>So can't you put filters on the crosstab to achieve what you want?</p>
    Warning No formatter is installed for the format ipb
  • <p>Not really as a filter on the crosstab would limit the data you see not the dimensions of the crosstab.</p><p> </p><p>I still want to see all the data but decide to have a 2x3 instead of 3x3 crosstab.</p>
  • Hans_vd
    edited September 13, 2013 #4
    <p>I see.</p><p>Not sure if it can work, but what would happen if you add aggregations by your dimension?  You might be able to hide the dimension while showing the aggregations or to show the dimension and hide the aggregations.</p><p>It's just an idea... I'll try this out as soon as I find the time, I'm very curious too...</p><p> </p><p>Please post a comment if you find anything</p>
    Warning No formatter is installed for the format ipb
  • <p>Thanks is confusing me at the moment too :-).</p><p> </p><p>Might need to re-think report and add columns/rows to cross as required rather then removing them.</p><p> </p><p>I can kind of get what I want at the moment by hiding the data but you still get the border lines from the rows/columns which are now blank which looks rubbish. I have tried setting all padding and border lines to 0 which removes most but you still end up with border lines around cells that are empty.</p>
  • <p>I tried to build a crosstab the way I described in comment #4, but without result.</p><p>When I hide a crosstab cell, the corresponding aggregation becomes invisible too.</p>
    Warning No formatter is installed for the format ipb
  • kclark
    kclark E
    edited September 30, 2013 #7
    <p>You can hide columns in a crosstab from the onCreate() doing something like this.</p><pre class="_prettyXprint _lang-">var counter = 0;function onCreateCell( cellInst, reportContext ){ if(counter % 4 == 0) { cellInst.getStyle().display = "none"; } counter++;}</pre><p>I haven't tried it for rows but it should be something similar.</p>
    Warning No formatter is installed for the format ipb