From: donn@... Date: 2007-02-26T08:45:10+09:00 Subject: Re: Ruport, Table append, access to record On Feb 25, 1:37 pm, "Gregory Brown" wrote: > On 2/25/07, d...@cmscms.com wrote: > > > I want r. to the last record appended. I was hoping r = @tbl_PAS << > > would be it. But r points to the table, not the last record appended. > > try: > > r = @tbl_PAS[-1] > > This should do the trick. > > For further questions, please come catch up with us on the Ruport list.http://list.rubyreports.org > > -greg Thanks. Sometimes "too easy" makes one feel really dumb. I'm trying to exploit all the capabilities of Ruport's tabling handling -- and struggling. I don't know why this is seeming so difficult. I now get an error when using group_by_tag. In my data load, I've done the following: def apply_category(r) case when r.proj[0,4] == 'ADMN' r.tag(:Administration) when r.task[0,5] == 'AL916' r.tag(:Support) when (r.task[0,2] == 'IS' or r.proj == '76011' or r.proj == '75634' or r.proj == '75638') r.tag(:Development) else r.tag(:Other) end end When I attempt to utilize those tags, things go south. I've attempted: def cat_hours(c) hrs = 0 t = @tbl_PAS.group_by_tag(c) #@tbl_PAS.group_by_tag(:Development).each {|r| hrs += r.whours} printf "%-15s = %5.2f\n",c,hrs end But I am typically greeted with "Exception: undefined method `group_by_tag' for #" If you have any suggestions, that would be much appreciated. What I am doing is attempting to deal with the increased time reporting demands of my company. Their time tracking system is dismal, but it exports data to Excel. So I want to table everything, categorize it at will, and produce six or seven different summaries from the various data elements available. thanks again, dvn