# Ruby Reports 0.4.19 Released

**URL:** <https://www.ruby-forum.com/t/ruby-reports-0-4-19-released/100604>\
**Category:** Ruby\
**Created:** [July 30, 2006, 8:50pm UTC](https://www.ruby-forum.com/t/ruby-reports-0-4-19-released/100604 "2006-07-30T20:50:42Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![naething](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/e47774/32.png) [@naething](https://www.ruby-forum.com/u/naething)\
**Post date:** [July 30, 2006, 8:50pm UTC](https://www.ruby-forum.com/t/ruby-reports-0-4-19-released/100604/1 "2006-07-30T20:50:42Z")

</div>

Hi folks, I’m happy to announce the 7th Summer of Code release of  
Ruport.

= Ruby Reports 0.4.19 : The “Robber Baron” Edition =

== What is Ruport? ==

Ruby Reports is a library and soon-to-be framework for doing business  
reporting. It provides a highly extensible formatting system, a  
reporting friendly set of data structures, a very high level interface  
to databases, and a common way of structuring and running your  
reporting applications. It aims to integrate a number of Ruby’s best  
tools so that you can easily take advantage of them.

== What is new in this release? ==

We now have rudimentary support for grouping.  
Though it is just a start, we’re already able to do some fun stuff.

For a somewhat visual example of this, see [Parked at Loopia](http://pastie.caboo.se/6632)

I’ve also cleaned up a lot of messy code with the help of JEG2, and  
fixed a few bugs in Data::Table that Dudley F. pointed out.

There is also the load\_csv method in Report, This allows you to  
easily build a DataSet (our current default datastructure), a  
Data::Table(the thing that I want to replace DataSet soon), or a plain  
old Array. This is mostly syntactic sugar, but it’s pretty nice that  
if you wanted to convert a CSV to a PDF in Ruport, it’d be as easy as  
this:

load\_csv(‘data.csv’).as(:pdf)

The next release will feature an invoice engine written by James  
Healy, and some additional support for grouping, so please do let us  
know what you think about the new features!

== Installation ==

Ruport is a gem, but if you need help with some of the dependencies  
(such as DBI) or want to do a manual install, there are detailed  
instructions available here: [http://ruport.infogami.com/Installation](http://ruport.infogami.com/Installation)

You can download it manually from Rubyforge here:  
[http://rubyforge.org/frs/?group\_id=856](http://rubyforge.org/frs/?group_id=856)

Or grab it from SVN via:  
svn://rubyforge.org//var/svn/ruport/tags/rel\_0\_4\_19

== Resources ==

[1] Wiki : [http://ruport.infogami.com/](http://ruport.infogami.com/)  
[2] Atom: [http://ruport.infogami.com/blog/atom.xml](http://ruport.infogami.com/blog/atom.xml)  
[3] Mailing List:  
[http://lists.stonecode.org/listinfo.cgi/ruport-stonecode.org](http://lists.stonecode.org/listinfo.cgi/ruport-stonecode.org)

Right now, because documentation is either outdated or transient for a  
lot of the core functionality of Ruport, we encourage you to use our  
more ‘interactive’ resources.

Almost all Ruport related news eventually makes it onto the wiki[1],  
so it may be a good place to start. There is also an Atom Feed there  
for Ruport’s blog, which might be a good way of keeping up on the  
latest news[2]. We encourage people to use the wiki actively, adding  
tutorials, feature requests, reporting problems, commenting on  
articles, etc.

There is also the mailing list[3] which has an archive that can help  
you get up to speed on Ruport or solve a quick question. This is a  
very good place to start a discussion if you are working on project  
you’d like to use Ruport in, are interested in contributing code, or  
need to report a problem.

Finally, there is the IRC channel, which all three of Ruport’s  
developers hang out on often. You can find this on freenode.  
(#ruport)

There is a lot of cool new stuff in Ruport as a result of the Summer  
of Code. We even have some basic functionality for you rails folks  
out there. The problem is, we haven’t been very good at ensuring  
things get documented, especially since things are moving so fast. So  
please use these resources and let us know if you’re lost, confused,  
or want to help 🙂

---

<div class="post-metadata">

**Author:** ![naething](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/e47774/32.png) [@naething](https://www.ruby-forum.com/u/naething)\
**Post date:** [July 31, 2006, 8:03pm UTC](https://www.ruby-forum.com/t/ruby-reports-0-4-19-released/100604/2 "2006-07-31T20:03:46Z")

</div>

Agreed, I was thinking the same thing.

Symbols are cool, but so are method calls without arguments, and without  
empty parenthesis.

Ben

---

<div class="post-metadata">

**Author:** ![naething](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/e47774/32.png) [@naething](https://www.ruby-forum.com/u/naething)\
**Post date:** [July 31, 2006, 7:57pm UTC](https://www.ruby-forum.com/t/ruby-reports-0-4-19-released/100604/3 "2006-07-31T19:57:23Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

Gregory B. wrote:

> We now have rudimentary support for grouping.  
> Though it is just a start, we’re already able to do some fun stuff.
> 
> For a somewhat visual example of this, see [Parked at Loopia](http://pastie.caboo.se/6632)

Here’s an idea for the code in that example:

a.as\_text would be easier to read and type

> load\_csv(‘data.csv’).as(:pdf)

The same idea applies here:

load\_csv(‘data.csv’).as\_pdf  
-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEzkQBmV9O7RYnKMcRAoGxAJ0cwDt8uKn4OiBPhHxwsOdr23qdQwCfTUns  
7O5NXBIwkpCm3lPsDaJWm0A=  
=1O+3  
-----END PGP SIGNATURE-----

---

<div class="post-metadata">

**Author:** ![naething](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/e47774/32.png) [@naething](https://www.ruby-forum.com/u/naething)\
**Post date:** [July 31, 2006, 9:09pm UTC](https://www.ruby-forum.com/t/ruby-reports-0-4-19-released/100604/4 "2006-07-31T21:09:08Z")

</div>

On 7/31/06, Suraj N. Kurapati [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Here’s an idea for the code in that example:
> 
> a.as\_text would be easier to read and type
> 
> > load\_csv(‘data.csv’).as(:pdf)

On the DataSet class, we have things like to\_csv, and to\_html

Data::Table hasn’t gotten these yet. I use the as() method because it  
can take a block that lets you do complex formatting.

I think for Data::Table, i will method\_missing it to recognize  
to\_plugin\_name methods, so that even user created formatting plugins  
are recognized.

---

<div class="post-metadata">

**Author:** ![naething](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/e47774/32.png) [@naething](https://www.ruby-forum.com/u/naething)\
**Post date:** [July 31, 2006, 9:25pm UTC](https://www.ruby-forum.com/t/ruby-reports-0-4-19-released/100604/5 "2006-07-31T21:25:15Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

Gregory B. wrote:

> I think for Data::Table, i will method\_missing it to recognize  
> to\_plugin\_name methods, so that even user created formatting plugins  
> are recognized.

Agreed. method\_missing is certainly the best approach.

def method\_missing id, _args, &blk  
if id =~ /^as\_(._)$/  
as $1.to\_sym, \*args, &blk  
end  
end  
-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEzlh7mV9O7RYnKMcRAkLLAJwLTNnij6YG9oXUtuQrvj0/vCUjewCaA54N  
YPlz15Ii6wk05Ogp2arGcSI=  
=n5Fd  
-----END PGP SIGNATURE-----

---

<div class="post-metadata">

**Author:** ![naething](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/e47774/32.png) [@naething](https://www.ruby-forum.com/u/naething)\
**Post date:** [July 31, 2006, 10:08pm UTC](https://www.ruby-forum.com/t/ruby-reports-0-4-19-released/100604/6 "2006-07-31T22:08:23Z")

</div>

On 7/31/06, Suraj N. Kurapati [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Agreed. method\_missing is certainly the best approach.
> 
> def method\_missing id, _args, &blk  
> if id =~ /^as\_(._)$/  
> as $1.to\_sym, \*args, &blk  
> end  
> end

This implementation is fine, I just have a slightly different design in  
mind.

1. I’d like to keep the rubyish semantics of to\_s, to\_a etc if all I  
am doing is a straight conversion. So i’m going to prefix these w. to  
instead of as

2. I don’t want these methods to take arguments or blocks, because I  
want them to be dumb. This is just so people go ahead and learn the  
much more powerful as() method if they actually need it.

I have added some code that does this, you can see it here.  
[http://stonecode.svnrepository.com/ruport/trac.cgi/changeset/62](http://stonecode.svnrepository.com/ruport/trac.cgi/changeset/62)

Thanks for the suggestion, I also cleaned up my regex after seeing your  
code.

---

<div class="post-metadata">

**Author:** ![naething](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/e47774/32.png) [@naething](https://www.ruby-forum.com/u/naething)\
**Post date:** [July 31, 2006, 10:11pm UTC](https://www.ruby-forum.com/t/ruby-reports-0-4-19-released/100604/7 "2006-07-31T22:11:45Z")

</div>

On 7/31/06, Gregory B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> On 7/31/06, Suraj N. Kurapati [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > Agreed. method\_missing is certainly the best approach.
> > 
> > def method\_missing id, _args, &blk  
> > if id =~ /^as\_(._)$/  
> > as $1.to\_sym, \*args, &blk  
> > end  
> > end

Found a bug in yours and a redundancy in mine. When using  
method\_missing, always call super, otherwise you are going to leave a  
debugging nightmare

> I have added some code that does this, you can see it here.  
> [http://stonecode.svnrepository.com/ruport/trac.cgi/changeset/62](http://stonecode.svnrepository.com/ruport/trac.cgi/changeset/62)

my send was pointless. new code here  
[http://stonecode.svnrepository.com/ruport/trac.cgi/changeset/63](http://stonecode.svnrepository.com/ruport/trac.cgi/changeset/63)

If you have any more suggestions or ideas, I’d love to hear them on  
the Ruport mailing list, especially since they’ll be archived over  
there and also reach a more direct audience. Seems like my host is  
down right now though :-/

When it comes back up, you can find it here:  
[http://lists.stonecode.org/listinfo.cgi/ruport-stonecode.org](http://lists.stonecode.org/listinfo.cgi/ruport-stonecode.org)
