tmagalhaes Posted May 12, 2010 Share Posted May 12, 2010 Hello everyone,I'm trying to put together a crosstab report and have to display 3 fields in my row header, a number code, the description corresponding to the code and a second string calculated form the code by the database.The row is bucketed along the code query field and that value I can show in my row header simply referring the bucket name variable.The other two values are the problem.I can't simply display $F{FIELD_NAME} inside the row header since the query fields are not visible in that context.I tried creating Measures pointing to the fields I want with a Nothing calculator, but that simply displays null in every row, instead of the correct values.So, is there any way to produce with the following data tableCODE_ASDF DESC_ASDF CALC_ASDF OTHER_QUERY_COLUMNS...1 ABC FOO1 ABC FOO1 ABC FOO24 X BAR24 X BARA report with row headers like this:1 ABC FOO Crosstab detail cell data goes here24 X BAR Crosstab detail cell data goes here?Thanks in advance Link to comment Share on other sites More sharing options...
tmagalhaes Posted May 13, 2010 Author Share Posted May 13, 2010 Ok, ended up being able to work around the issue.Since I know the 3 fields will be unique for each bucket I want to print, instead of bucketing on a single field I defined the group expression asString.valueOf($F{CODE_ASDF})+ "~" +String.valueOf($F{DESC_ASDF})+ "~" +String.valueOf($F{CALC_ASDF})and in each of the fields where I wanted to use a value$V{GROUP}.split("~")[0] for CODE_ASDF$V{GROUP}.split("~")[1] for DESC_ASDF$V{GROUP}.split("~")[2] for CALC_ASDFI actually put helper methods to do this stuff in my Scriptlet, but this is the basic idea.A little ugly and not very readable, but it works... Link to comment Share on other sites More sharing options...
lucianc Posted May 18, 2010 Share Posted May 18, 2010 tmagalhaesWrote: A little ugly and not very readable, but it works... Log a feature request if you'd like to see a cleaner way of doing this.Regards,Lucian 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