How to draw a vertical line in microsoft access report detail section?

I have invoice report that need to be printed in a full page report.

The problem is that I need to draw vertical lines in my  detail section that need exactly to be 5 inches long even  even if only 1 or 2  data  appear in the report.

I hope u guys understand what i mean..... thks

Who is Participating?

Improve company productivity with a Business Account.Sign Up

shanesuebsahakarnConnect With a Mentor Commented:
Sorry, it should be:

Report.Line (xTop, yTop) - (xBottom, yBottom)

This can only be used to draw vertical or horizontal lines - if you try to draw a diagonal one, you end up with a rectangle (which might actually be what you need). I haven't tested this though.
Set your detail section to 5 inches and draw a vertical line 5 inches.

oh I see the problem...won't work....

what happens when the data in the detail is longer than 5 inches...should like still be 5 inches?

Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to and use offer code ‘EXPERTS’ to get 10% off your first purchase.

Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
(A wild stab) In your report reate a subreport that's five inches tall.  Then create the vertical lines on the main report, right on top of the subreport.  Then, select all vertical lines and go to the Format menu item, Bring to Front.

Like I said, this is a wild stab.  I don't think this can be done in a really clean manner in Access.

Hope this helps.
cutemouseAuthor Commented:
after 5 inches ... should go to the next page...

the data is a buying transaction of a shop

report sample

|article no  |  Description |  unit order | unit price | sub total |
| 1            | aa              |         5       |       $1    |      $5     | ---
| 2            | bb              |         1       |       $2    |      $2     |    |
|               |                  |                  |              |               |    |---->  5 inches  
|               |                  |                  |              |               |    |
|               |                  |                  |              |               |----
                                                        grand total        $7

somothing like this.. so even the data is 2 ... but i want to make the vertical line in 5 inches.  

thks for the reply
You could use the Line method. In the OnPage event of the report, you could do something like this:

Report.Line 1440, 0, 1440, 7200

This would draw a vertical line 1 inch from the left and 5 inches long. The arguments go:
Line top x, top y, bottom x, bottom y

Measurements in this case are in twips (1440 to an inch). You can set it to use other measurements instead.
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
Perhaps a better idea would be to avoid this altogether and ask the client why this silly requirement exists in the first place.

I can always dream...
following jim's idea....give him a ruler and a pencil.....just kidding....Mike
cutemouseAuthor Commented:

anyway thks

erm...  shanesuebsahakarn, can you give me a full command of Report.Line 1440, 0, 1440, 7200 ? is it Report.Line (1440, 0, 1440, 7200) ?

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.