Data from Report to Excel transfer. Is it possible?

M

mark909

Hello,

I was wondering if it is possible to take information created in a report
containing subreports and transfer it to a excel worksheet?

Thanks for any help! :)
 
G

golfinray

Right click on the name of the report and hit Export. Tell it to export to
Excel.
 
M

mark909

Thanks but the report contains subreports

What I specifically want is to transfer information from individual cells in
a report to individual cells in excel.

I cant export the whole report because the different subreports are composed
of different criteria from multiple tables
 
T

Tony Toews [MVP]

mark909 said:
Thanks but the report contains subreports

What I specifically want is to transfer information from individual cells in
a report to individual cells in excel.

I cant export the whole report because the different subreports are composed
of different criteria from multiple tables

From what little I've seen anything beyond a simple report doesn't
export well to Excel. And if it does it's ugly beyond belief.

If you want to spend lots of time in VBA code I'd suggest doing the
copyrecordset thing.

Modules: Sample Excel Automation
http://www.mvps.org/access/modules/mdl0006.htm
Modules: Transferring Records to Excel with Automation
http://www.mvps.org/access/modules/mdl0035.htm

Now you'd almost certainly want to have loops for the outmost set of
records, copy those values one record at a time into the current Excel
row, Then shift to the right some inside Excel and use the
copyrecordset to dump the first subreport into the spreadsheet. Then,
by keeping track of the number of records in the first recordset you'd
move down that many cells and dump in the next sub report. And so
forth.

So it would look something like

abc | 123 | 455
def | 23423 | 2343
hig | 23423 | 2343
asdflj | 234443 | 34234 | 234234
def | 323 | 234
dsdf | 23423 | 2343
sxe | 23423 | 2343
ljiuer| 234443 | 34234 | 234234
and so forth.

Tony
 

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

Top