Which outputs:
+--------------------------------------------------+
| Name | Title | Spouse | Children |
+--------------------------------------------------+
| John | Accountant | Suzy | John Jr. |
| George | Watchman | Joan | GeorgetteGeorgina |
+--------------------------------------------------+
But what I'd like is:
+--------------------------------------------------+
| Name | Title | Spouse | Children |
+--------------------------------------------------+
| John | Accountant | Suzy | John Jr. |
| George | Watchman | Joan | Georgette |
| | Georgina |
+--------------------------------------------------+
Or something similar. Any way to do this? I've started looking at
customizing the Text renderer, but I am wondering if perhaps there is
an easier way that I've just overlooked. I've not used Ruports until
a few days ago. What a great bit of work here, I got rid of all my
ugly reporting hacks!
I'm afraid as far as I can tell the text formatter code will only output
one row per row in the data table. You could probably iterate over each
row in the data table and create a new row with blank values whenever
you encounter an array value, but that's nasty and still wouldn't be the
exact output you're after. I think joining the array values with a
newline would break the table.
So yes I think you're right that the best way would be to override the
row builder in the text formatter!
Regards,
Andrew
Thanks for responding! Cheers!
Yeah it's a hard problem that's native to displaying it as text, it
wouldn't be so much of an issue in HTML or PDF. Getting the column
positioning correct based on the current text formatter will be very
difficult so I would hesitate in recommending even subclassing it.
You know, commas are good. :P
One last crazy thought, you could generate the table as HTML then use an
HTML to text converter!
Regards,
Andrew
--
You received this message because you are subscribed to the Google Groups "Ruby Reports" group.
To post to this group, send email to ruby-r...@googlegroups.com.
To unsubscribe from this group, send email to ruby-reports...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ruby-reports?hl=en.