Set height for textbox in report with macros

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have report with table and each cell is textbox with border solid. Each
textbox has "CanGrow" parameter set to "Yes". I would like all textboxes
horizontaly to have the same height. When "Name" textbox increase it's
height due to longer text, all other textboxes have to increase their height
too. I tried to do this with 2 ways but without success:
1. Macros
Action: SetValue
Item: [Reports]![TablePrice]![Number]![height]
Expression: [Reports]![TablePrice]![Name]![height]
2. Function
Detail - Format
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Reports!TablePrice!Number.Height = Reports!TablePrice!Name.Height
End Sub
I connected this macros and after that function to "onFormat" property of
"Detail" section of the report where is my table, but I receive errors.
Please help me !
 
krassi69 said:
I have report with table and each cell is textbox with border solid. Each
textbox has "CanGrow" parameter set to "Yes". I would like all textboxes
horizontaly to have the same height. When "Name" textbox increase it's
height due to longer text, all other textboxes have to increase their height
too. I tried to do this with 2 ways but without success:
1. Macros
Action: SetValue
Item: [Reports]![TablePrice]![Number]![height]
Expression: [Reports]![TablePrice]![Name]![height]
2. Function
Detail - Format
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Reports!TablePrice!Number.Height = Reports!TablePrice!Name.Height
End Sub
I connected this macros and after that function to "onFormat" property of
"Detail" section of the report where is my table, but I receive errors.


You're not going to be able to do what you want using the
text box borders.

What you'll have to do is use the detail's Print event to
draw the lines around the section using the report's Line
method. This can get tricky to figure out, so I suggest you
use the PrintLines code at www.lebans.com
 
Back
Top