if @results.size > 0
@table = Ruport::Data::Table.new(:data =>
@results , :column_names => @col_names)
end
Eventually, I would like to add pdf support, graphing, etc. so I will
need to get my hands dirtier.
My question is, is it possible to add a table subheader, like this
(I'm not sure how this is going to render since font is not
fixed...but hopfully you'll get the idea.)
| Category A | Category B | Category C |
----------------------------------------------------------------------------------
| A1 | A2 | B1 | B2 | C1 | C2 |
----------------------------------------------------------------------------------
| data | data | data | data | data | data |
Thanks!
Robin
On Jun 7, 10:54 am, rhinmass <rhinm...@yahoo.com> wrote:
> My question is, is it possible to add a table subheader, like this
>
> (I'm not sure how this is going to render since font is not
> fixed...but hopfully you'll get the idea.)
Hi. Not exactly, but you can get grouped output using Grouping()
That would be the place to add extensions to get exactly the
formatting style you want.
If you come up with anything interesting, or need help with doing
that, let us know
-greg
Maybe if I am more specific about my example it would help.
--------------------------------------------------------------------------|
| Sports | Entertainment |
Politics |
--------------------------------------------------------------------------|
| Searches | Plays | Searches | Plays | Searches |
Plays |
--------------------------------------------------------------------------|
foo | 1999 | 100 | 299 | 199 | 499 |
49 |
bar | ...
@result contains [[foo,1999,100,299,199,499,49],[bar,x,y,...]]
Any pointers are appreciated.
Robin
On Jun 7, 11:32 am, rhinmass <rhinm...@yahoo.com> wrote:
> I guess I'm having trouble understanding how to employ Grouping for
> this.
>
> Maybe if I am more specific about my example it would help.
>
> --------------------------------------------------------------------------|
> | Sports | Entertainment |
> Politics |
> --------------------------------------------------------------------------|
> | Searches | Plays | Searches | Plays | Searches |
> Plays |
> --------------------------------------------------------------------------|
> foo | 1999 | 100 | 299 | 199 | 499 |
> 49 |
> bar | ...
>
> @result contains [[foo,1999,100,299,199,499,49],[bar,x,y,...]]
>
> Any pointers are appreciated.
Gotcha. yeah, this isn't really a grouping, you're right.
You'd need to roll your own subheader support. :-/
Let us know if you go that route and if you have any problems you run
into.
We'd probably be interested in making this easier, some way or another.