none
Sub Report with columns RRS feed

  • Question

  • I have a report (Access 2003) with 3 columns. Prints on one page just fine. I need a header on the across the whole page so I put the report in a subreport. Now I get 3 pages, one for each column. Any suggestions?
    A camel is a horse designed by a committee.
    Thursday, January 20, 2011 9:01 PM

Answers

  • Subreport's di that when you use Down then Across snaking because they don't know when the end of the page has been reached.  If you can use Across then Down, it will behave as you want.

    BUT, you do not need to use a subreport just to get the Report/Page headers/footers to go across the page.  In the Columns specs window, uncheck the Same As Detail box and set the column width manually.  Then you can make the report wide enought to get the header across the whole page.

    • Marked as answer by SJones Thursday, January 20, 2011 9:41 PM
    Thursday, January 20, 2011 9:19 PM

All replies

  • If you want mutiple columns in a sub report, you must use Across and Down as the column layout setting.

    A sub-report knows nothing about where the page is breaking so with down and across it just does DOWN.


    John Spencer Access MVP 2002-2005, 2007-2011 The Hilltop Institute University of Maryland Baltimore County
    Thursday, January 20, 2011 9:16 PM
  • Put your header in the page header.  Only the detail prints in columns.  You don't need a subreport just to print a header on the page.
    Thursday, January 20, 2011 9:18 PM
  • Subreport's di that when you use Down then Across snaking because they don't know when the end of the page has been reached.  If you can use Across then Down, it will behave as you want.

    BUT, you do not need to use a subreport just to get the Report/Page headers/footers to go across the page.  In the Columns specs window, uncheck the Same As Detail box and set the column width manually.  Then you can make the report wide enought to get the header across the whole page.

    • Marked as answer by SJones Thursday, January 20, 2011 9:41 PM
    Thursday, January 20, 2011 9:19 PM
  • I have been fighting this off and on for many years. This is the first answer that makes sense. The columns have to be down and across.

    So why didn't I think of this.

    Thanks a lot.


    A camel is a horse designed by a committee.
    Thursday, January 20, 2011 9:45 PM
  • SJones,
     
        In this context, my sample db named SubReport_GroupHdrAcrossColumns might also be of interest to you. It is in access 2000 file format and is available at Rogers Access Library. Link:
     
        This sample db demonstrates display of group header across all the columns (on all pages) in a multi-column subreport (Column layout: Across, then Down). This feature can be useful for displaying page header content of subreports.
     
        Subreports suffer from the known limitation that their page headers do not get displayed. The work-around is to include the contents of page header in a dummy group header (with its Repeat Section property set to Yes).

        However, a multi-column subreport faces the hurdle that a group header can cover only one column width.

        The solution lies in including a sub-subreport in a dummy group header of the subreport, to serve as surrogate page header. The contents to be displayed are preferably included in report header section of this sub-subreport.
     
        Caution:
        --------
              In order to prevent distorted display of columns, suitable additional number of blank dummy group headers should be inserted (as demonstrated in the sample db) so as to ensure that their total number equals the number of columns. Repeat Section property of each such group header should be set to Yes.
     
    Best wishes,
    A.D. Tejpal
    ------------
     
    ----- Original Message -----
    From: SJones
    Newsgroups: Msdn.en-US.accessdev
    Sent: Friday, January 21, 2011 02:31
    Subject: Sub Report with columns

    I have a report (Access 2003) with 3 columns. Prints on one page just fine. I need a header on the across the whole page so I put the report in a subreport. Now I get 3 pages, one for each column. Any suggestions?
    A camel is a horse designed by a committee.

    A.D. Tejpal
    Friday, January 21, 2011 4:42 AM
  • Marshall Barton's response is the correct solution. No subreport this time but the report is still Down and Across and the page is breaking exactly as expected. Also note that the report has several group headers and footers along with the details section, which all print in columns just as expected.

    Thanks


    A camel is a horse designed by a committee.
    Friday, January 21, 2011 5:12 PM