Jumat, 22 November 2013

RE: [MS_AccessPros] Sub reports borders should touch main reports Page footer

 

Khalid,

Typing "Line Method" into the ask a question box allows you to see information about using the line method including:

"The width of the line drawn depends on the DrawWidth property setting. The way a line or rectangle is drawn on the background depends on the settings of the DrawMode and DrawStyle properties."

If you need more help, you can enter DrawWidth into the search box.

Duane Hookom MVP
MS Access

________________________________
> From: khalidtanweerburrah@yahoo.com 
>
> John
>
> As you mentioned it's a method of trial and errors to get it exactly
> right. I've played many many times and come to this stage that on
> preview of report i can see complete box on the page.
>
> But when i do print left side is completely not printing. Again i do
> copy my code, please see still am i making any mistake. Also is there
> any way to get this box "Bold" and also if left side is not coming in
> print range is there any connection with page set up of access/office ?
> I did played there also but cannot resolve it yet.
>
> Sub DrawLine()
> Dim rpt As Report, lngColor As Long
> Dim sngTop As Double, sngLeft As Double
> Dim sngWidth As Double, sngHeight As Double
>
> Set rpt = Reports![COO Aventis]
> ' Set scale to inches.
> rpt.ScaleMode = 1
> ' Top inside edge.
> ' Calculate the top of the rectangle
> sngTop = rpt.ScaleTop - 20
> '------------------------
> ' Left inside edge.
> sngLeft = rpt.ScaleLeft - 1 ' -1(putting this value in +ve and
> increasing value decreases top of box)
> '--------------------------
> ' Width inside edge.
> sngWidth = rpt.ScaleWidth - 2 'This increases Right width of box
> '-----------------------------
> ' Height inside edge.
> sngHeight = rpt.ScaleHeight - 0.75
> '-------------------------------
> ' Make color black.
> lngColor = RGB(0, 0, 0) ' Black
> '------------------------------
> ' Draw line as a box.
> rpt.Line (sngTop, sngLeft)-(sngWidth, sngHeight), lngColor, B
> End Sub
>
> Regards, Khalid
>
>
> On Wednesday, November 20, 2013 2:10 PM, John Viescas <JohnV@msn.com> wrote:
>
> Khalid-
>
> You have set the ScaleMode to millimeters, which should be a small
> enough increment to allow you to adjust a bit at a time until it comes
> out how you want it. You need to play with this:
>
> ' Left inside edge.
> sngLeft = rpt.ScaleLeft + 1
>
> If the line is too far from the edge, try adding negative values. If
> it's not far enough from the edge, make the amount you add larger until
> the line moves until you want it. I have often found it's a matter of
> trial and error to get it exactly right.
>
> John Viescas, Author

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (15)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar