views:

90

answers:

1

Once I created a form builder where user could select any number of fields for a web form. The tool then produced a code snippet which user could copy in the JSP.

The submitted form data was stored as a key-value pairs in the DB, so basically just two columns were required for the form specific data. If I remember right, the processing of the DB data was required to be done outside Java.

So creating nice excel output of this was a bit tricky. I ended up using iReport and its crosstab functionality but it wasn't a nice experience.

Are there better ways to store such form data than just using key-value pairs? Or are there some nice approaches to crosstab/pivot key-value data for reporting?

A: 

I try to follow the The Rule of Least Power - Using the simplest structure possible for the data gives you much more flexibility in display. That said, Excel's pivot table functionality is definitely very nice for simple data structures. After creating one, you might want to try the pivot chart functionality connected to it to visualize the data flexibly - Any changes to the pivot table are reflected in the pivot chart automatically.

l0b0