By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,482 Members | 2,438 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,482 IT Pros & Developers. It's quick & easy.

Have a Sub-report display a Print Preview rather than the Report View

100+
P: 101
I've been trying to figure this out for some time now to no avail. Is there any way to make a sub-report in a form or a report to show up as a print preview instead of the report view? There are several differences in the way these two are formatted. I've tried setting the default view to "Print Preview" for the report that is inserted into another form or report, but this doesn't help. There have been many occasions where the report view falls short of what I wanted to portray, and I feel like this knowledge could help a lot of users.
Jan 16 '14 #1
Share this Question
Share on Google+
5 Replies


zmbd
Expert Mod 5K+
P: 5,287
AFAIK: You can not directly embed the print-preview within a form. There was a method using the snapshot viewer; however, I do not recommend this route as this control has been removed as of ACC2010 (Access 2010 deprecated features and components


Question, why do this in a form?

As for subreports... I've never seen this happen. If I open a master report in print preveiw, it opens all subreports as resolved. Perhaps some more detail there?
Jan 17 '14 #2

100+
P: 101
Hi zmbd, in certain circumstances I use a form to select filter criteria for a report. I embed the report as a sub-report on that form so you can monitor what it will look like. I would like to show the print preview so that I wouldn't need a vertical scroll bar and I could use page selectors. It would make it a lot easier for some of my co-workers to follow. Also, the page numbers would be accurate to the printed report, as opposed to always saying Page 1 of 1.

As far as reports with embedded sub-reports, the problem I have is when the sub-report is either more than one page or it is split up into two pages because of where it starts it doesn't show the page headers for the sub-report. It is essentially the report view of the sub-report.
Jan 17 '14 #3

zmbd
Expert Mod 5K+
P: 5,287
The problem with what you are doing is that... the report preview isn't ment to be dynamic.

Your only workaround her is it let the user set the filters in the form and then show them the report in a normal print preview pane. If the report is good then they can print it. Even the new acc2010-NavigationControl has this limitation.

As far as reports with embedded sub-reports, the <..>starts it doesn't show the page headers for the sub-report. It is essentially the report view of the sub-rep
Page headers
or
Report headers

These are very easily mixed up. I had an individual at work that swore to me that his page headers/footers were not showing up in the sub-reports. What was actually happening was that he had set the report header to repeat and because report header do not show up in sub-reports, these were suppressed. We moved his report header to the page header and all is well.

Once again, I do not recall having seen the issue you describe in subreports in the report-print-preview. I'm at home; however, Monday when I go to work I'll open the EOY report I have, does a monthly summary with usually 3 to 10 pages for each subreport for each month (I don't run this often anymore) just to be sure I'm not overlooking something (^_^)
Jan 18 '14 #4

100+
P: 101
Thanks for your help zmbd. At least I know I can stop trying to look for a solution that doesn't exist. I was more concerned with the sub-reports in forms because I use that method for a lot of different aspects in my application.
Jan 18 '14 #5

NeoPa
Expert Mod 15k+
P: 31,186
As for the Subform/Subreport control, this is a control on the main form or report. I'm pretty sure there is nothing in the design/properties of the control that allows for specification of how it runs.

Thus, it is opened automatically at the time the main form/report is opened and so will take the context from the parent open call. Subforms are not ever opened by any VBA call. They are opened by virtue of the main form/report being opened only. Thus there cannot be a parameter that can specify what mode to open in as there is for the call to open forms/reports normally.
Jan 18 '14 #6

Post your reply

Sign in to post your reply or Sign up for a free account.