Prev | Current Page 350 | Next

David Berube

"Practical Reporting with Ruby and Rails"

You can start it using the command ruby script/server.
Then download the sample training.mdb file from the Source/Downloads area of the
Apress web site (http://www.apress.com) or from http://rubyreporting.com/examples/
training.mdb.
Run this loader as follows:
ruby training_loader.rb
It should present you with a file open dialog box similar to Figure 12-3. Select the
training.mdb database, and you??™ll get a message box notifiying you how many records
were imported.
CHAPTER 12 n CREATING REPORTS WITH RUBY AND MICROSOFT OFFICE 253
nTip You can also pass this script an argument on the command line. Users may like dialog boxes, but
there is no reason not to make your scripts accessible via a more familar Unix-style command-line interface.
For example, you could use the Windows scheduler to run this command once an hour, which means that
the user would not need to update the database manually.
Figure 12-3. Choosing a database
Next, open the training.mdb database in Access, click the Reports tab, and then double-
click the Passing Trainees report.


Pages:
338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362
for your soul M-People Robert Miles Liroy LMC