Michael
Michael

Reputation: 99

Why won’t 2010 MS Access preview or print a report with subreports?

I have a perfectly compliled report consisting of two subreports (thanks to the Stack). I use this line of code to open it:

DoCmd.OpenReport "rptGRANT_REPORT", acViewPreview

…looks like this:

enter image description here

But when I try to preview or print report it looks like this: (no subreports):

enter image description here

Any suggestions?

Upvotes: 1

Views: 730

Answers (1)

Michael
Michael

Reputation: 99

This problem originated using the Report Wizard. I tried another approach by opening a blank report and dragging the subreports into it....problem solved.

The vba code for opening and printing the report is the following:

DoCmd.OpenReport "rptGRANT_REPORT", acViewReport

and

DoCmd.OutputTo acOutputReport, "rptGRANT_REPORT", _ 
    acFormatPDF, "C:\Users\User\Downloads\Grant_Report.pdf"

Upvotes: 1

Related Questions