Jump to content

Rotating Data Results/Merging Records..?


jnguyen75

Recommended Posts

 Hello,

 

So the reports that I am trying to generate are on the more complex side.  I am doing an aggregate query to get data for computing metrics, so my data looks something like this:

 

1  |  key1  |  value1

2  |  key2  |  value2

3  |  key3  |  value3

...

 

However, since I need those values to compute data and since jasper deals best with data all in one record, I need to somehow get those values rotated to look like this:

 

key1     | key2    | key3...

value1 | value2 | value3...

 

I've been looking into solutions, but have had no luck.

- Rotating the query in SQL would be complex, complicated and probably too expensive (requiring n number of nested queries).

- Something along the lines of subdata sets may have helped, but those only work for charts/crosstabs

- Haven't looked too deeply into scriptlets, but apparently those work best with report variables.  My reports going to be a big list of reports and subreports.  

- Maybe do the accumulation outside of the jasper or maybe creating a datasource that does it for me?  The least desirable route since it'd be nice to have everything inside the report.

 

Please let me know if there may be a better alternative that can achieve this goal for me.  Anything pointing me in the right direction would be very helpful.. thanks!

 

-- Jimmy

Link to comment
Share on other sites

  • 4 weeks later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...