
Originally Posted by
jamil_kwi
I made a Report and put borders at detail section's feilds but the problem is if there is more text in one column than the border lines increase with the text length but the other column that has not more text data the border lines are not increased as the the more text data column.
I also put "Can Grow = Yes " in property of details section. For you reveiw i am attaching the veiw of the report.
Please help me in this regards,
---Jamil
The height of each textbox has to be examined to match the height of the tallest and adjustments made set against that value. There is then a 'workaround' element to what you are seeking to achieve using the .Line property of the report as a substitution to the native textbox border. The following should work for you. Replace field name references being passed to the array with the field names on your own report.
Paste into the Detail_Print event of your report. (I could not read the last field on your .jpg attachment). Make sure the textboxes but up to each other vertically and horizontally.
Code:
On Error GoTo Err_Detail1_Print
ReDim strcontrol(4)
strcontrol(0) = "ITEM"
strcontrol(1) = "DESCRIPTION"
strcontrol(2) = "QTY"
strcontrol(3) = "UNITPRICE"
strcontrol(4) = "TOTAL"
Dim lngCounter As Long, dblMaxHeight As Double
dblMaxHeight = 0
For lngCounter = 0 To UBound(strcontrol)
If Me(strcontrol(lngCounter)).Height > dblMaxHeight Then dblMaxHeight = Me(strcontrol(lngCounter)).Height
Next
For lngCounter = 0 To UBound(strcontrol)
If lngCounter = 0 Then
Me.Line (Me(strcontrol(lngCounter)).Left, Me(strcontrol(lngCounter)).Top)-Step(Me(strcontrol(lngCounter)).Width, dblMaxHeight), , B
Else
Me.Line (Me(strcontrol(lngCounter)).Left, Me(strcontrol(lngCounter)).Top)-Step(Me(strcontrol(lngCounter)).Width, dblMaxHeight), , B
End If
Next
Exit_Detail1_Print:
Exit Sub
Err_Detail1_Print:
MsgBox Error$, vbInformation, "Detail1_Print Command Cancelled"
Resume Exit_Detail1_Print
End Sub