[ruport] Improving Ruport

21 views
Skip to first unread message

Andrew France

unread,
May 22, 2010, 9:34:25 AM5/22/10
to ruby-r...@googlegroups.com
Hi everyone,

I have a question for you all: what features and changes would you like
to see in Ruport?

Michael Pope and I have started putting in a Prawn formatter, but at the
moment it's a moving target. We've seen improvements to Ruport Table
pivoting thanks to Bob Nadler, and we have some other minor Table
changes to release.

I think some of Ruport's strongest features are its data manipulation
abilities so I would like to make Table and Groups more useful, I have
some ideas but suggestions are welcome.

Please post ideas here first, preferably with use-cases and if we think
they're useful for all and acheivable we'll list them at the GitHub wiki
page (below) and start working on them.
http://wiki.github.com/ruport/ruport/todo

If you are permitted to share your Ruport code it would be a great way
for us to understand both how Ruport is used in practice and what the
pain points are. Please use http://gist.github.com/ to post code
snippets and send the link to the list. I will post some of my code to
demonstrate my (mis)use in the next few days once I've secured
permission to do so.

Thanks!

Andrew France
-- Ruport Maintainer

--
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.

Daniel L. McNulty

unread,
May 22, 2010, 12:47:09 PM5/22/10
to ruby-r...@googlegroups.com
The only thing I can really think of is something I brought up a month or so ago:  enabling multi-value cells.  Here's an example program that shows what I mean: http://gist.github.com/410197

This program outputs:
+-------------------------------------------------------------------------------+
|   Name   |   Title    |         Pets         | Spouse |       Children        |
+-------------------------------------------------------------------------------+
| John     | Accountant | RufusCheshire        | Suzy   | John Jr.              |
| George   | Watchman   | Squirtle             | Joan   | GeorgetteGeorgina     |
| Paulette | Director   | FeathersClawIronLion | David  | JulesVernNemoNautilus |
+-------------------------------------------------------------------------------+

I hacked text.rb so that it outputs this:
+-------------------------------------------------------------------------------+
|   Name   |   Title    |         Pets         | Spouse |       Children        |
+-------------------------------------------------------------------------------+
| John     | Accountant | Rufus                | Suzy   | John Jr.              |
|          |            | Cheshire             |        |                       |
| George   | Watchman   | Squirtle             | Joan   | Georgette             |
|          |            |                      |        | Georgina              |
| Paulette | Director   | Feathers             | David  | Jules                 |
|          |            | Claw                 |        | Vern                  |
|          |            | IronLion             |        | Nemo                  |
|          |            |                      |        | Nautilus              |
+-------------------------------------------------------------------------------+

But I suspect my hack (also at http://gist.github.com/410197) will break other things, and hasn't been implemented for anything but the text formatter.  Also, as you can see the column widths are still calculated using the length of the array, rather than the length of the longest array member.  I have not been able to figure out how to fix that yet.

For now this does what I need, but I sure would like the experts to implement this feature for real :-)

-- Daniel L. McNulty

Bob N

unread,
Jun 16, 2010, 10:24:27 AM6/16/10
to Ruby Reports
Hi,

Sorry I didn't respond sooner, but I've been trying to get permission
to post some of my code involving Ruport. Unfortunately, I can't. :(

For me, the one "pain point" that I have involves formatting,
specifically numbers. To format a column of numbers, I usually create
a loop in the report controller that loops through each row and does
the formatting. Something like:

data[:some_table].each do |row|
row[:some_number_column] =
FormatHelper.number_to_currency(r[:some_number_column], :precision =>
0)
end

This becomes a pain when I have multiple tables in a report, each of
which can have multiple columns that need to be formatted. Are others
doing it this way as well? Or am I missing something?

Anyway, the only other areas where I think Ruport can be improved are
Prawn support (which is already being worked on) and updating
acts_as_reportable for Rails 3. I haven't really done anything in
Rails 3 yet, but I was at RailsConf last week and the one thing that
everyone kept talking about was how Rails 3 will most likely break
existing plugins/gems. So people are scrambling to update them for
Rails 3 compatibility. Has anyone tried AAR with Rails 3 yet? I should
have some time during the next couple of weeks to take a look at it.
I'll post whatever I find to the ruport-dev list.

Regards,
Bob Nadler

On May 22, 9:34 am, Andrew France <andrew-li...@odaeus.co.uk> wrote:
> Hi everyone,
>
> I have a question for you all: what features and changes would you like
> to see in Ruport?
>
> Michael Pope and I have started putting in a Prawn formatter, but at the
> moment it's a moving target. We've seen improvements to Ruport Table
> pivoting thanks to Bob Nadler, and we have some other minor Table
> changes to release.
>
> I think some of Ruport's strongest features are its data manipulation
> abilities so I would like to make Table and Groups more useful, I have
> some ideas but suggestions are welcome.
>
> Please post ideas here first, preferably with use-cases and if we think
> they're useful for all and acheivable we'll list them at the GitHub wiki
> page (below) and start working on them.http://wiki.github.com/ruport/ruport/todo
>
> If you are permitted to share your Ruport code it would be a great way
> for us to understand both how Ruport is used in practice and what the
> pain points are. Please usehttp://gist.github.com/to post code
Reply all
Reply to author
Forward
0 new messages