fgaudin Posted June 14, 2010 Share Posted June 14, 2010 Hello, I have two row groups in my crosstab element and I would like values to be repeated so that the report output can be used effectively in Excel. Here is the output I get: 2008 2009 2010 GA a 22 3 9 e 65 4 6 IR l 4 34 7 VG a 14 8 6 And this is the output I would like to have: 2008 2009 2010 GA a 22 3 9 GA e 65 4 6 IR l 4 34 7 VG a 14 8 6 I have tried selecting and deselecting "print repeated values" for the first row group but it doesn't seem to make any difference to the output.Does anyone know if I can make the values repeat as in the second example above?? Code: Post Edited by fgaudin at 09/14/2011 08:14 Link to comment Share on other sites More sharing options...
baggypants Posted June 15, 2010 Share Posted June 15, 2010 Create another group which is Column1||Column2 and set that above column1 and then hide it? Link to comment Share on other sites More sharing options...
fgaudin Posted June 15, 2010 Author Share Posted June 15, 2010 That does work and might be a workaround in some cases. However the reason I want to export to excel is to be able reorder and filter on the different columns. If it ends up all concatenated in one cell then that defeats the purpose of exporting to excel... :-( Link to comment Share on other sites More sharing options...
baggypants Posted June 21, 2010 Share Posted June 21, 2010 Have three columns with the concatenated cell being the first one and then hide it somehow. Link to comment Share on other sites More sharing options...
besmirgogu Posted April 25, 2011 Share Posted April 25, 2011 Hi, Did you actually manage to find a way to print repeated values in a crosstab?I have the exact same problem. Link to comment Share on other sites More sharing options...
fgaudin Posted April 27, 2011 Author Share Posted April 27, 2011 Hi,Yes, I followed baggypants's advice and it works fine. Just create an invisible column that contains a concatenation of your columns fields. In that way the values will always be unique and the repeated values in the other columns will be displayed.I hope that's helpful. Let us know what you find... Link to comment Share on other sites More sharing options...
besmirgogu Posted April 28, 2011 Share Posted April 28, 2011 Hi, thank you very much for your reply. I have another question?How do you create this invisible column? Regards Link to comment Share on other sites More sharing options...
fgaudin Posted April 28, 2011 Author Share Posted April 28, 2011 From memory I think there is a 'visible' attribute if not as a last resort you could set the width to 0 and drag the rest of the columns to take the place. Link to comment Share on other sites More sharing options...
ktalarico Posted September 13, 2011 Share Posted September 13, 2011 Great post everyone; I can't believe this was so easy and I had been struggling with it for so long. Thank you! Link to comment Share on other sites More sharing options...
dimuthuroshan3 Posted June 24, 2014 Share Posted June 24, 2014 change the bucket expression of report row group. make the bucket expression by concatenation of few fields.Eg:<bucket class="java.lang.String"><bucketExpression><![CDATA[$F{field1}+""+$F{field2}]]></bucketExpression></bucket> Link to comment Share on other sites More sharing options...
gollapudi.narasimharao Posted August 11, 2014 Share Posted August 11, 2014 Hello, I have similar problem but here is situation i.e., I have a cross tab with 3 row groups and multiple column groups. When data filled in cross tab,first row group is blank when the second & row groups having the data.What we need is that crosstab should allow duplicate values instead of blanks. I tried to having a invisible column but didn't worked for me. RowGroup1 RowGroup2 RowGroup3 ColumnGroup1 ColumnGroup2 1 11 111 22 23 12 121 24 24 So,Here in second row,We need to display 1 in first column. Can any one please help me to succeed from this situation? Please let me know if you need any further details to get this done? Thanks, Gollapudi. Link to comment Share on other sites More sharing options...
gotoark Posted March 2, 2018 Share Posted March 2, 2018 In bucket Expression, I added the $F{repeatedField}+" "+$F{nonrepeatedField} as mentioned by @dimuthuroshan3 .It works like a charm Thanks Man :) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now