FasterCSV (faster_csv) and Question of understanding

D

Dot Baiki

Dear Experts,

I got a question for you: I need to produce a Ruby code which does the
following:

1. I get a CSV file (more or less like this:
name,id,in,out,ot,ab,x1,x2,x3,x4)
2. I need to remove some columns (like the x1..x3)
3. I need to group them per user (in this case either name or id)
4. I need to add columns like salary (which I have to calculate first)
5. I need to add a row with the monthly salary
6. and... a PDF to print this correctly

And now? Ruby + FasterCSV + ???PDF???

Please, do not come up with Ruport because I tried this for 7 days now.
success = 0

Are there better solutions (please no Jasper, OpenRPT etc.)

Regards,
Baiki
 
J

James Edward Gray II

I got a question for you: I need to produce a Ruby code which does the
following:

1. I get a CSV file (more or less like this:
name,id,in,out,ot,ab,x1,x2,x3,x4)
2. I need to remove some columns (like the x1..x3)
3. I need to group them per user (in this case either name or id)
4. I need to add columns like salary (which I have to calculate first)
5. I need to add a row with the monthly salary
6. and... a PDF to print this correctly

And now? Ruby + FasterCSV + ???PDF???

FasterCSV can definitely help you read an manipulate the data as you
have described.
Please, do not come up with Ruport because I tried this for 7 days
now.
success = 0

Have your tried handling the PDF generation using Prawn (http://prawn.majesticseacreature.com/
)? Hopefully it can do what you need.

James Edward Gray II
 
R

Ralf Mueller

Dot said:
Dear Experts,

I got a question for you: I need to produce a Ruby code which does the
following:

1. I get a CSV file (more or less like this:
name,id,in,out,ot,ab,x1,x2,x3,x4)
2. I need to remove some columns (like the x1..x3)
3. I need to group them per user (in this case either name or id)
4. I need to add columns like salary (which I have to calculate first)
5. I need to add a row with the monthly salary
6. and... a PDF to print this correctly

And now? Ruby + FasterCSV + ???PDF???

Please, do not come up with Ruport because I tried this for 7 days now.
success = 0

Are there better solutions (please no Jasper, OpenRPT etc.)

Regards,
Baiki
I wrote a CSV-handling library for similar purposes (e.g. grouping,
extcsv.rubyforge.org). Maybe it's helpfull.
In case you use it and run into problems, drop me a line.

regards
Ralf
 
D

Dot Baiki

James said:
FasterCSV can definitely help you read an manipulate the data as you
have described.


Have your tried handling the PDF generation using Prawn
(http://prawn.majesticseacreature.com/
)? Hopefully it can do what you need.

James Edward Gray II

OK, seems like I don't have to buy Crystal Reports (hi hi hi hi). I have
downloaded Prawn and will start to play around (or mess around?) with
today :)

However, thanks for this nice piece of software and advice! Brilliant!

Greetings from West Africa
baiki
 
D

Dot Baiki

Ralf said:
I wrote a CSV-handling library for similar purposes (e.g. grouping,
extcsv.rubyforge.org). Maybe it's helpfull.
In case you use it and run into problems, drop me a line.

regards
Ralf

Hallöchen and hello Ralf

Great, thanks a lot! Just visited your page and I definitely have to
consider your solution as well. Since I am a bloody beginner, it'll take
a decade to really understand everything but it's worth it :)

Thanks so much!

Greetings from West Africa
baiki
 
D

Dot Baiki

Dot said:
OK, seems like I don't have to buy Crystal Reports (hi hi hi hi). I have
downloaded Prawn and will start to play around (or mess around?) with
today :)

However, thanks for this nice piece of software and advice! Brilliant!

Greetings from West Africa
.baiki

Hello Sir James Edward Gray II,

Well, now I know who I am talking to :) Respect! However, I checked all
the suggestions: Ruport, Ruby, CSV, fastercsv, prawn, extcvs.

All so beautiful. However, right now I have at least three lines in my
code
#!/usr/bin/ruby
require 'rubygems'
require 'ruport'

Hope I go in the right direction. Let you know when I have success (or
questions).

Greetings
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,879
Messages
2,569,939
Members
46,232
Latest member
DeniseMcVi

Latest Threads

Top