If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Setting number of lines in detail section
If I understand correctly, you want to draw 20 horizontal lines on a report
page and print records on the lines for as many as your record count. Is that correct? What happens if you have more than 20 records? -- Duane Hookom MS Access MVP -- "Al" wrote in message news Hi, all! Using Acces 2K/2K2 - grouped report. How can I set the detail section to always show say 20 lines even though there may be anywhere from 1 to 19 records in a particular group. In other words, if I have 5 records in a group, I'd like to show those five records plus 15 "blank" lines. Thanks! Al |
#2
|
|||
|
|||
Setting number of lines in detail section
Remove any line controls that you might have been using to underline
records. Add this code to the On Page event of your report. This code assumes Report Header and Page Header sections. You may need to remove one or the other. You may also want to adjust the currentX and CurrentY calcs. Private Sub Report_Page() Dim intRptHeadHeight As Integer Dim intPageHeadHeight As Integer Dim intTopMarg As Integer Dim intDetailHeight As Integer Dim intRecNum As Integer intRptHeadHeight = Me.ReportHeader.Height intPageHeadHeight = Me.Section(3).Height intTopMarg = intRptHeadHeight + intPageHeadHeight intDetailHeight = Me.Section(0).Height For intRecNum = 1 To 20 Me.CurrentX = 200 Me.CurrentY = intTopMarg + _ ((intRecNum - 1) * intDetailHeight) Me.Print intRecNum Me.Line (0, intTopMarg + _ (intRecNum * intDetailHeight)) _ -Step(Me.Width, 0) Next End Sub -- Duane Hookom MS Access MVP -- "Al" wrote in message ... Thanks, Duane Yes - your understanding is correct. If there are more than 20 records, the report forces them to subsequent pages - IOW the detail section is sized for no more than 20. Can I get piggy and ask for a suggestion as how to number the lines - real records and added lines as well? Thanks again. Al On Sun, 22 Jan 2006 19:04:25 -0600, "Duane Hookom" wrote: If I understand correctly, you want to draw 20 horizontal lines on a report page and print records on the lines for as many as your record count. Is that correct? What happens if you have more than 20 records? -- Duane Hookom MS Access MVP |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
sizing vertical lines to detail section height | chris halley | Setting Up & Running Reports | 4 | January 12th, 2006 02:53 AM |
Report with set number of rows per page | Ken from Chicago | Setting Up & Running Reports | 7 | January 4th, 2006 02:42 PM |
place horizontal line under detail section | Steel via AccessMonster.com | Setting Up & Running Reports | 5 | November 30th, 2005 09:13 PM |
Termination of a vertical line | Bill Schnur | Setting Up & Running Reports | 12 | March 21st, 2005 03:12 PM |
Is it possible to force the number of rows in the detail section? | Gonçalo Fael | Setting Up & Running Reports | 5 | November 4th, 2004 01:36 PM |