Results 1 to 7 of 7
  1. #1
    DarrenUD is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    22

    Limit detail section to a certain size

    Hi,



    I have created a invoice report from using one of the tables in my database, now everything is working fine except I want the details section to expand to a certain height and move to the next page when I add new items to my report. please help me with this problem. Thanks
    Click image for larger version. 

Name:	invoice.jpg 
Views:	18 
Size:	33.4 KB 
ID:	9874

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,641
    Does report have report header/footer, page header/footer, group header/footer? Any space left over after these sections render is all that's available for the detail section. Detail section rendered height is controlled by the number of records and the design height of the section and available paper space.
    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.

  3. #3
    DarrenUD is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    22
    Hi June, yes you are right. I have expand the "Page Footer" section and it did the trick. But, as you can see from the image bottom line segment of the first page is gone, I have attached a line to the "Report footer" and it appears in the next page. If I draw a line in the "Page footer" section then it appears on each page and that is annoying. Is it possible to dynamically draw a line during report load (is it report load)....event (I mean count the number of report pages and draw a line in [pages -1]page (though I am not sure how to code this)..please help.






  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,641
    Maybe possible to programmatically control the visibility of a line based on that criteria, but doesn't sound easy and I don't have any code. It would be in Format event of relevant section, probably Detail section.
    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
    DarrenUD is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    22
    I have done it using the following code...yeah!!!Private Sub Report_Page()Dim nop As IntegerDim i As IntegerDim rpt As ReportDim sngWidth As Single, sngHeight As SingleMe.ScaleMode = 7Set rpt = Reports!xxxxxxxxxxxsngHeight = rpt.ScaleHeightsngWidth = rpt.ScaleWidthnop = Me.PagesIf (nop > 1) And (Me.Page = 1) Then Me.DrawStyle = 0 Me.DrawWidth = 10 Me.Line (0, sngHeight - 5.951)-(sngWidth - 0.05, sngHeight - 5.951), vbBlackEnd IfEnd Sub

  6. #6
    DarrenUD is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    22
    I have done it using the following code...yeah!!!

    Private Sub Report_Page()
    Dim nop As Integer
    Dim i As Integer
    Dim rpt As Report


    Dim sngWidth As Single, sngHeight As Single


    Me.ScaleMode = 7
    Set rpt = Reports!xxxxxxxxxxx


    sngHeight = rpt.ScaleHeight
    sngWidth = rpt.ScaleWidth


    nop = Me.Pages
    If (nop > 1) And (Me.Page = 1) Then
    Me.DrawStyle = 0
    Me.DrawWidth = 10
    Me.Line (0, sngHeight - 5.951)-(sngWidth - 0.05, sngHeight - 5.951), vbBlack
    End If


    End Sub

    Thanks ...all

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,641
    Congratulations! I had some vague thoughts on a different approach. But after seeing your code, triggered a recollection I had used the Page event once a loooong time ago. Pulled up that report and there it is! However, my code is nowhere as complex and is setting length of vertical lines. Looking at it now I can't even understand how it works, it's been so long. Had to re-research it. Amazingly, Google search got me to the original thread that helped me before http://www.accessmonster.com/Uwe/For...ll-page-length
    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.

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

Similar Threads

  1. Columns in Report Detail Section only
    By gg80 in forum Reports
    Replies: 10
    Last Post: 08-03-2014, 07:41 PM
  2. Detail Section Keeps Repeating values
    By progamer in forum Reports
    Replies: 6
    Last Post: 07-30-2012, 10:28 PM
  3. Count in detail section of a report
    By ccordner in forum Reports
    Replies: 9
    Last Post: 02-08-2012, 06:55 AM
  4. Report header section-size limit
    By baba in forum Access
    Replies: 2
    Last Post: 11-30-2011, 09:43 AM
  5. The length of detail section of a report
    By blueraincoat in forum Reports
    Replies: 2
    Last Post: 04-06-2011, 12:24 AM

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