Reports :: Breaking To New Page If Subreport Cannot Fully Print On Current Page
Nov 12, 2013
I have a report which includes several subreports. There will be times when a subreport prints partially on one page and completes on the next. I don't always want to break to a new page with this subreport. However, I would want to break to a new page if the subreport cannot fully print on the current page.
I have a report in which there is a subreport that prints towards the bottom of the page. I know that I can use grouping to have the subreport print on the next page if the entire subreport cannot print on the current page. However, I want to have the break occur not for the section as a whole but between records. Let me illustrate this.
All sorts of other stuff prints at the top. At the bottom, I have a subreport which today prints the following on the first page and breaks the last record in two printing the second line on the next page.
First Page of the Report: __________________________________________________ _______________ Doctor's Full Name: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Doctor's Location: XXXXXXXXXXXX
Doctor's Full Name: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Doctor's Location: XXXXXXXXXXXX
Doctor's Full Name: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX __________________________________________________ _______________ Second Page of the Report: __________________________________________________ _______________ Doctor's Location: XXXXXXXXXXXX __________________________________________________ _______________
What I would like to do is the following:
First Page of the Report: __________________________________________________ _______________ Doctor's Full Name: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Doctor's Location: XXXXXXXXXXXX
Doctor's Full Name: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Doctor's Location: XXXXXXXXXXXX __________________________________________________ _______________ Second Page of the Report: __________________________________________________ _______________ Doctor's Full Name: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Doctor's Location: XXXXXXXXXXXX __________________________________________________ _______________
Is it possible to specify that if a complete record within a subreport cannot be printed on the same page to break to the next page without having the whole subreport break to the next page?
I've used the following code on the footer on print procedure:
Private Sub PageFooterSection_Print(Cancel As Integer, PrintCount As Integer) Me.PageFooterSection.Visible = (Me.[Page] = 1) End Sub
This works fine when you view it in print preview, but the footer don't show up at all when you actually print it.The reports default view itself is set print preview.
I have been working on this for over a week in Access 2010 and I know that I am almost there, but need getting over this last hurdle as I have a severe case of tunnel vision on this while I am trying to get it to work.
I have a Main Report based on my Element table and a subreport based on my OTC table. There is a one-to-many relationship between the Element and the OTC table.My Master / Child Fields between the two reports are as follows: ElementID;GroupNum
My SQL for the Main report is:
Code: SELECT Val(DCount("*","Element","ElementID=" & [ElementID] & " AND Step <" & [Step]))2 AS GroupNum, Element.ElementID, Element.ProcessID, Element.ModelID, Element.Step, Element.ElementDescription, Element.RevDate, Element.GPCFS, Element.TrainingGate FROM Element
[code]...
As an example in testing this report, I am looking at a specific Element with 33 records and a total of 72 OTC records. Each of the 33 records can have 1 or 2 or 3 or up to 4 OTC records but the report is only 17 pages which tells me that the page break is occuring based on the ElementID and not on the OTC records....
I have a database of high-school football players, and I am looking to print out single page reports (or forms) that will show detail from several tables and queries. This will act as their resume when they visit schools on recruiting visits. The reason for needing query items, is that I have developed queries that return the most up to date height, weight, 40 time etc., and that single most up to date number is what should print, not the entire table. When I try to build a report it will let me bring in multiple tables, but not queries.
I have seen large projects in which there are clearly several printed database reports printed out to make one booklet.
1. How does one get page numbers for multiple reports to go in sequence instead of starting over again at 1 for each report.
2. How can you add a page reference in one report to something in another report?
Do you have to do these things by hand or is there a way to create a something with auto numbering capabilities? Do you do it by importing the reports to MS Word and creating a master document?
I've got a report that spits out a barcoded label for items on my inventory. What I'd like to know, is if there is a way in 2010 to allow the user to select where on the page for the label to print.
I found a way that looks like it worked for 2007, but it required enabling ADO, which I am not able to do on my work computer.
If I have a report and it has controls (labels representing column titles) in the page header. Now when I print the report - if it happens that the last page has no detail records - but there is text boxes and so forth in the report footer. Is there a way to not display the page header on the last page?
I have a report where the last page shows the page header - and the field/column labels on the page header - but for which there is no detail records left to display - on the last page. There is report footer information that should display. It just looks weird because the field/column labels show at the top of the page - but there is no data remaining to print under them on that last page.
I am trying to create an invoice report. I want to add all the costs from the detail section in my footer. I have accomplished this in either the Report footer and/or the page footer, but the problem is that the report footer doesn't go to the bottom of the page, and the page footer doesn't go to just the last page. I have tested a bunch of suggestions that don't seem to work.
1. Print page footer with Report header = NO - only works if your report is two pages or more.
2. Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As Integer) If Page = Pages Then Me.[TextBoxName].Visible = True Else Me.[TextBoxName].Visible = False End If End Sub
The Page functions worked, but it did not change the results from page to page. If it was a two page report, then the if statement is false and the text box was not visible on page 1, but it also was not visible on page 2.
I have a report that is fixed at one page for one record. However, there is a subreport with many transactions ("CanGrow"=No). If this goes to a new page I have to close the report and start a new one. This all works fine, except for the last transaction - if the second-to-last transaction record is at the bottom of a page then the last one does not print.
Access seems to format the data, then it realizes that it won't fit on the page so doesn't print it. I am using record id number to know which transaction record to start the next report on, so when it gets to the end my logic thinks it has reached the end as the id number is the last one in the set.
How can I know if the last record has printed or not?
I have a report that lists states and cities within the states. When a state name happens to be at the end of the page the individual cities appear on the next page with no State heading. I solved the second page problem by setting the "repeatSection = Yes" in the Section Header (though I haven't shown that in the example below).
But the previous page (which just shows the State Name and no cities looks dumb. Is there some sort of solution.?? (Actually I would also like any State that continues to a next page to not just have the state name but something like " Colorado (Continued)" Is there anything I can do in VB to make a page break if the section is going to print but therer isn't enough room for one detail line?
This is what I currently see
Alaska Ancorage Prudo Bay
California Whittier Anaheim
Colorado ------------------------Page Break --------------------------------- Denver Pueblo Colorado Springs
I have a report with field "Plot" as Group Header. I need to print the report which lists the owners of each Plot. When the number of owners is large, it takes more than one page for the listing. How can I force a new page for each new Plot ?
I have a data access page needs a filter by a dropdownlist, the dropdownlist used is a html control and I use javascript to filter the data programmaticlly in the onchanged event of the control.
MSODSC.DataPages(0).Recordset.Filter="AppID = 3";
My problem is, when this statement runs, the page refreshes. But I don't need the page refreshes, it set the dropdownlist text to the default text, not the value user select. The browser is IE7.
I have one-page forms which print a second page, blank except for a block of grey shading at the top. I have tried moving the content of the form up but that doesn't eliminate the second page. If I look at print preview, every second page of the entire database shows up as blank, regardless of where that happens to appear in the record.
I have a report with four subreports. If the subreports have no data I have a formula to put the word 'none' in the first field as follows:
=IIf(IsNull([Question]),"None",[Question])
I do a print preview and the word 'None' shows up and subreport looks good when I view just the subreport as well as when I view the full report.
When I print the subreport the text '#Error' prints. When I print the full report I just get a blank space.
I need the subreport to print with the word 'None' if there is not data. How do I accomplish? I tried the above formula both in the query and in the control source of the report. It just comes up blank when I put it in the query.
I have several reports that include subreports in them, each one has a bold border surrounding it. When viewing the reports in Access, the spacing and layout is great.
But when I print the reports--either physically or to PDF--the text within the subreports somehow shifts left and up. Some of the subreports--by virtue of chance--happen to have enough extra space, but others don't and part of the text gets clipped by the border.
I'm not exactly motivated to go through the reports and readjust the layout for each one but if there's a database setting that I can change to correct it that would be nice.
I've attached a screenshot (where the layout is perfect) and a printed PDF (where the text is clipped) of one of the reports. The issue can best be seen in the Public/Private ZooMobile and Indoor/Outdoor ZooMobile subreports.
I am working on a change control database where the users can enter a new version for the software they just released and send out a notification to the appropriate persons. I have a form where the user can select a combobox to pick the software version, which is bound to my "Releases" table. From the software version I use a DLookup in VBA to change the value of a another unbound text box using:
This all works fine when I'm entering data in the form, but if I want to print the form, the unbound text box on each page is only calculated from the first record. The same thing happens if I build a report with the same fields and code.
For example: In print preview the text box on page 1 should say "Cat" based on the current record and the text box on page 2 should say "Dog". However, they both say "Cat"
How do I get the text box to display the new value on each page?
to automatically create a second, third, fourth... page depending on how many characters are in the narrative. The only other thing needed to be changed is the page# of Page#.
I have added the Allen Browne Calendar 2k control to my form.
My form consists of 4 pages. On pages 2 and 3 I have subforms and on page 4 I have Personal data. Page 1 is general data and the Calendar is on Page 1.
What is happening is that the Calendar is also being displayed on my 4th page, in the same position as page 1. When I try to move it, cover it or delete it from page 4, it is also gone from page 1.