[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2004-09-21
9
Medium Priority
?
1,050 Views
Last Modified: 2013-11-28
hi,
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



0
Comment
Question by:cutemouse
  • 3
  • 2
  • 2
  • +1
9 Comments
 
LVL 18

Expert Comment

by:Data-Man
ID: 12116929
Set your detail section to 5 inches and draw a vertical line 5 inches.

Mike
0
 
LVL 18

Expert Comment

by:Data-Man
ID: 12116942
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?

Mike
0
 
LVL 66

Expert Comment

by:Jim Horn
ID: 12116949
(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.
-Jim
0
Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

 

Author Comment

by:cutemouse
ID: 12117023
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
0
 
LVL 41

Expert Comment

by:shanesuebsahakarn
ID: 12117027
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.
0
 
LVL 66

Expert Comment

by:Jim Horn
ID: 12117101
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...
0
 
LVL 18

Expert Comment

by:Data-Man
ID: 12117136
following jim's idea....give him a ruler and a pencil.....just kidding....Mike
0
 

Author Comment

by:cutemouse
ID: 12117169
lol....

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) ?

thks
0
 
LVL 41

Accepted Solution

by:
shanesuebsahakarn earned 2000 total points
ID: 12117253
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.
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question