Link to home
Start Free TrialLog in
Avatar of gmapdc
gmapdc

asked on

Problem exporting Access report with subreport to Excel

I have an Access report which includes a subreport.  It prints fine in Access, but when I export it to Excel, the subreport begins in the next row and column of the main report.....example: the main report data is in Excel rows A1 thru Q111 - then the subreport begins in row R112 and uses as many columns as needed to the right (ends in AI113).

Is there any way to make the subreport align directly under the main report - that is to begin in cell R1?????   Than x for your help!

p.s.  I am NOT exporting using a VBA command - I am merely using the External Data icon to export the report to the Excel file.  I could use the VBA command if I could append the subreport to the main report?????
ASKER CERTIFIED SOLUTION
Avatar of als315
als315
Flag of Russian Federation image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gmapdc
gmapdc

ASKER

I tried your example and got the same exact output - by normal behaviour are you saying that it is not possible to get the subreport to align with the main report?????
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gmapdc

ASKER

I did have to use VBA code - in a procedure from a button, I ran sql queries of each report and subreport and appended the data to a common temp table.  The trick was to be sure the queries had the same number of columns, that there was no conflict of data types, and the columns were aligned the way I wanted.    I then exported the table , using TransferSpreadsheet, and finished by deleting the data from the temp table.  

This worked really nicely - thanx for pointing me in the right direction.