Solved

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

Posted on 2004-09-21
9
886 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

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 500 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

717 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