| [reply] |
Well you know how you can generate reports through access, i was wondering if there is anyway to do it in DBI. I need to generate a bunch of nicely formatted reports with different field criteria. I though somehow i could do like an sql type query to generate the report in access.
| [reply] |
When most people talk about 'Access reports', they are refering to making the reports from within Access. In that case, no, because Access and DBI are both mutually exclusive database clients. (well, Access also has an MS Jet Database built into it, but I think of them as two seperate parts)
If, however, you want to make reports in Access from something which is being edited via DBI, you may be able to -- but it's a function of the database, and mostly unrelated to DBI.
If your database supports ODBC, you can set up a DSN with your connection info, and point to that. (there are probably ways to handle it without a DSN, but I like the encapsulation). You'll want to search some of the MS Access websites on how to do it. I haven't had to do this in ~5-6 years, so it's possible that anything I've remembered is wrong, or has since changed.
| [reply] |
You could possibly use one of the Win32::* modules to automate Access and have it spit out a report. If you want to actually create the report outside of Access, DBI with ODBC will take care of the SQL end - it will allow you to make any query you could make from within Access. Then to generate the report, you could use DBI::Format or a templating system like HTML:Template or Template::Toolkit. | [reply] |
If you have extracted data from the database, the format keyword can be used to design output formats.
See the perldoc perlform document for everything on how to design and use such formats.
Manav
| [reply] |