Results 1 to 8 of 8
  1. #1
    ncub is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2015
    Posts
    10

    Formatting report

    I have a table with 6 fields : Class_code, Name, Birth, Sex, Address and Phone.


    And I need to generate a report where 3 fields at the top of page and 2 field are at the bottom of the same page.

    This report grouped by Class_code where a group may have more than 5 records, but I want the report view 5 records per page.

    Any simple way to do this with Access 2007 ?

    Click image for larger version. 

Name:	Report1.jpg 
Views:	16 
Size:	35.0 KB 
ID:	20425
    Last edited by ncub; 04-23-2015 at 03:46 AM.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    In rpt design, click Grouping/sort. Insert CLASS. Turn on header and footer.
    In the header put the Class field.
    Click the tools, make them visible
    in the footer grab the pageBreak icon and drag it into the footer.

    you may need to review in the Access report help. Or Google.

  3. #3
    ncub is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2015
    Posts
    10
    But I need to format the report page as in the picture, not only grouping the records.

    3 fields on top of page, and the rest 2 fields on the bottom of the same page.


    Quote Originally Posted by ranman256 View Post
    In rpt design, click Grouping/sort. Insert CLASS. Turn on header and footer.
    In the header put the Class field.
    Click the tools, make them visible
    in the footer grab the pageBreak icon and drag it into the footer.

    you may need to review in the Access report help. Or Google.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Odd arrangement. Why would you want the address and phone separated from the name?

    Might require subreport(s).
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    ncub is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2015
    Posts
    10
    It's only a simple example.
    The real one have many field that will not fit even in landscape mode, and the user want them printed on the same page to make it easy to read.

    Quote Originally Posted by June7 View Post
    Odd arrangement. Why would you want the address and phone separated from the name?

    Might require subreport(s).

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Same comment about subreport(s) applies.

    I have faced this same issue. I ended up making the report display the data for each record on multiple 'lines'. I arranged the texboxes in staggered arrangement above each other and the labels in header the same staggered arrangement.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    ncub is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2015
    Posts
    10
    Try to use subreport.

    Main report fields : Name, Birth, Sex
    Subreport fields : Address, Phone

    Subreport placed in Page footer. Both report linked and grouped by Class_code.

    Then add some codes in main report property :

    Code:
    Dim RecPerPage As Integer
    
    
    Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
    'Reset record per page for each group
        RecPerPage = 1
    End Sub
    
    
    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    'Set max record per page = 5
        If RecPerPage = 5 Then
            Reports![Main_Report].Section(acDetail).ForceNewPage = 1
            RecPerPage = 0
        Else
            Reports![Main_Report].Section(acDetail).ForceNewPage = 0
        End If
        RecPerPage = RecPerPage + 1
    End Sub

    The field arrangement works perfectly with limited record per page in main report, but I can't limit the record in each subreport page.

    For example, if a Class_Code has 12 records, the first N records will be repeated in every page. Where N depends on how many line will fit in the height of the page footer.


    Still need some help on how to limit record in subreport....
    Last edited by ncub; 04-27-2015 at 08:19 AM.

  8. #8
    ncub is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2015
    Posts
    10
    no hope.....

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Report Formatting
    By School Boy Error in forum Reports
    Replies: 3
    Last Post: 12-06-2013, 04:52 AM
  2. Formatting a report
    By keydetpiper in forum Reports
    Replies: 4
    Last Post: 12-20-2012, 12:11 PM
  3. Formatting in a Report
    By MidoriiBlue in forum Reports
    Replies: 2
    Last Post: 02-23-2012, 03:50 PM
  4. formatting a report?
    By mejia.j88 in forum Reports
    Replies: 1
    Last Post: 01-13-2012, 03:20 PM
  5. formatting the report
    By simba in forum Reports
    Replies: 1
    Last Post: 08-12-2011, 12:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums