Report like an Excel spreadsheet with GridLines

  • Thread starter Thread starter Mike Metcalfe
  • Start date Start date
M

Mike Metcalfe

I want to display the contents of a table on a report that looks like an
Excel spreadsheet with gridlines. I created a report with 2 textboxes in the
detail section and 'boxed' them in with 3 vertical lines and 2 horizontal
lines, something like this:
-------------------------
| 1 | Short text |
-------------------------
| 2 | The contents of this |
| | is much longer |
-------------------------
| 3 | Another short field |
--------------------------

I'm having difficulty with the varying height of the text boxes. I set the
textboxes CanGrow to true and in the OnFormat event I set the vertical
lines' heights to the textbox height. As you probably know this doesn't
work because the textbox size hasn't yet change. Plus I cannot change the
heights in the OnPrint event because it's not allowed. So I tried to use
Stephen Lebans fTextHeight function to get the textbox height to set the
height of the three verticals from the OnFormat event and it does change
their heights but it doesn't look right.

Any ideas I can try?
 
Mike,
I know you asked this question some days ago, and I responded with my
solution. I was unable to monitor that thread, so I may have missed your
response.

Why aren't you using the border property of the text control itself to
display a border around your text?
It will grow properly according to the length of your text.
Al Camp
 
Back
Top