Line Draw Problem within Reports

G

Guest

Hi everybody,
I am drawing rectangulars boxes (frames) in a report during the DetailPrint
event. I do define those frames height by adding the height of the 2
textboxes (there are 2 only, positioned one directly below the other) - whose
CanGrow Property is True for both - , plus the space before the first textbox
and the space after the second textbox as I do want the frame to cover the
whole detail area. This works so far but seems to me quite circumstantial but
obviously necessary as I do get the true height only from the grown textboxes
but never from the - actually also grown - detail area. Why? Is there any way
to directly get the true height of the detail area? I have tried to use the
detail.height property, but this alway gives back the un-altered original
height of 823 Twips. I have to add, that the detail area stands within a
group. The commands I use are

PosLinks = BildA.Left - 30: PosOben = 0: RechteckBreite = (16.5 * TWI) + 30
RechteckHöhe = altCheckTexteUser1.Height + altCheckTexte.Height + (0.35 *
TWI)
Me.Line (PosLinks, PosOben)-Step(RechteckBreite, RechteckHöhe), 16711680, B

I had the idea to draw the line from the bottom of the groupheader to the
top of the groupfooter, but this only gives a frame around the full group.
But I need it individually for each detail area.

Mayby somebody knows something ?

Thanks anyway

Ulrich1947
 
D

Duane Hookom

I'm not sure I understand your needs or code. I prefer to place each
statement on its own line in a module. The following draws a box around a
couple text boxes that are stacked in the detail section.

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Dim intHeight As Integer
Dim intWidth As Integer
intHeight = Me.txtA.Height + Me.txtB.Height + 30
Me.Line (Me.txtA.Left - 30, 0)-Step _
(Me.txtA.Width + 60, intHeight), 16711680 , B
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top