By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,851 Members | 1,128 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,851 IT Pros & Developers. It's quick & easy.

Making text boxes on a report grow and shrink all together

P: n/a
I have a report with sub reports, one of the subreports have 12 text boxes
that are 2" high and I want them all to grow if one goes to 3" high.
If anyone has any suggestions they are very much appreciated.
Thanks
Edson Peacock
May 11 '06 #1
Share this Question
Share on Google+
11 Replies


P: n/a
> I have a report with sub reports, one of the subreports have 12 text
boxes that are 2" high and I want them all to grow if one goes to 3"
high.


You can't, because even if you were thinking about using Format event of
body section of your report, you may notice that the height of a control
is available only AFTER it is populated with values, so you cannot test when
it reaches 3" height.

You could try to control other aspects, like the lentgh of the value which
populates the textboxes, expecially if you are using a monotype font.

--
PBsoft di Gabriele Bertolucci
www.pbsoft.it
skype: pbsoftsolution
May 11 '06 #2

P: n/a
thanks will tr to lengthen size of entry

Edson Peacock

"PBsoft" <in**@REMOVEpbsoft.it> wrote in message
news:87**************************@news.tin.it...
I have a report with sub reports, one of the subreports have 12 text
boxes that are 2" high and I want them all to grow if one goes to 3"
high.


You can't, because even if you were thinking about using Format event of
body section of your report, you may notice that the height of a control
is available only AFTER it is populated with values, so you cannot test
when it reaches 3" height.

You could try to control other aspects, like the lentgh of the value which
populates the textboxes, expecially if you are using a monotype font.

--
PBsoft di Gabriele Bertolucci
www.pbsoft.it
skype: pbsoftsolution

May 11 '06 #3

P: n/a
On Thu, 11 May 2006 02:30:34 GMT, "Edson Peacock" <pe*********@mchsi.com>
wrote:

I assume that 12 text boxes 2 " high must be aligned horizontally.
If the boxes are all on one line: In the detail section, make the tops of all
boxes be the same and be greater than 0 (distance from top of section), height
= 2, and can grow = yes, and can shrink = no.

If the boxes are on multiple rows: Make the tops of the boxes in each row all
the same and at least .0007 below the bottom of the boxes above. height = 2.
can grow = yes, can shrink = no.

If one of the boxes above grows greater than 2, the entire row below will be
displaced down to clear the tallest box above.

Just a wizard prodder
Chuck
--
I have a report with sub reports, one of the subreports have 12 text boxes
that are 2" high and I want them all to grow if one goes to 3" high.
If anyone has any suggestions they are very much appreciated.
Thanks
Edson Peacock


May 11 '06 #4

P: n/a
"Edson Peacock" <pe*********@mchsi.com> wrote in
news:W5D8g.143802$oL.68847@attbi_s71:
thanks will tr to lengthen size of entry

Edson Peacock

"PBsoft" <in**@REMOVEpbsoft.it> wrote in message
news:87**************************@news.tin.it...
I have a report with sub reports, one of the subreports have
12 text boxes that are 2" high and I want them all to grow
if one goes to 3" high.


You can't, because even if you were thinking about using
Format event of body section of your report, you may notice
that the height of a control is available only AFTER it is
populated with values, so you cannot test when it reaches 3"
height.

You could try to control other aspects, like the lentgh of
the value which populates the textboxes, expecially if you
are using a monotype font.

--
PBsoft di Gabriele Bertolucci
www.pbsoft.it
skype: pbsoftsolution

Is the real problem that the 12 boxes have borders and you need
to have all the borders the same height?

If it is, here's a solution: make the boxes unbordered, then, in
the Print Event of the section, find the box with the greatest
height, and use the line command to draw borders.
--
Bob Quintal

PA is y I've altered my email address.
May 11 '06 #5

P: n/a
Edson,

How do you know all the boxes are not growing at the same time?
Mon, 15 May 2006 10:42:06 GMT, "Edson Peacock" <pe*********@mchsi.com>
they are on the same line and i want them to all grow if one of them grows.

thanks in advance

Edson
On Thu, 11 May 2006 09:43:51 -0400, Chuck <li*****@schoollink.net> wrote: On Thu, 11 May 2006 02:30:34 GMT, "Edson Peacock" <pe*********@mchsi.com>
wrote:

I assume that 12 text boxes 2 " high must be aligned horizontally.
If the boxes are all on one line: In the detail section, make the tops of all
boxes be the same and be greater than 0 (distance from top of section), height
= 2, and can grow = yes, and can shrink = no.

If the boxes are on multiple rows: Make the tops of the boxes in each row all
the same and at least .0007 below the bottom of the boxes above. height = 2.
can grow = yes, can shrink = no.

If one of the boxes above grows greater than 2, the entire row below will be
displaced down to clear the tallest box above.

Just a wizard prodder
Chuck


May 15 '06 #6

P: n/a
Chuck <li*****@schoollink.net> wrote in
news:nf********************************@4ax.com:
Edson,

How do you know all the boxes are not growing at the same
time?

You don't have to be Edson to know that horizontally allingned
text controls with can_grow set true will each grow to the
height determined by their contents. Using .borders will not
make a straight line across the row.. What has to be done is use
unbordered textboxes, and draw the lines in the section.print
event of the report.

Pseudocode
store 0 to variable.
for each control update variable if > current variable data.
draw horizontal line at control.top,
and at controlTop+ variable.
draw vertical lines at each control.left, and at
lastcontrol.left+lastleftcontrol.width
Mon, 15 May 2006 10:42:06 GMT, "Edson Peacock"
<pe*********@mchsi.com> they are on the same line and i want
them to all grow if one of them grows.

thanks in advance

Edson

On Thu, 11 May 2006 09:43:51 -0400, Chuck
<li*****@schoollink.net> wrote:

On Thu, 11 May 2006 02:30:34 GMT, "Edson Peacock"
<pe*********@mchsi.com> wrote:

I assume that 12 text boxes 2 " high must be aligned
horizontally. If the boxes are all on one line: In the detail
section, make the tops of all boxes be the same and be greater
than 0 (distance from top of section), height = 2, and can
grow = yes, and can shrink = no.

If the boxes are on multiple rows: Make the tops of the boxes
in each row all the same and at least .0007 below the bottom
of the boxes above. height = 2. can grow = yes, can shrink =
no.

If one of the boxes above grows greater than 2, the entire row
below will be displaced down to clear the tallest box above.

Just a wizard prodder
Chuck



--
Bob Quintal

PA is y I've altered my email address.
May 15 '06 #7

P: n/a
On Mon, 15 May 2006 21:48:00 GMT, Bob Quintal <rq******@sympatico.ca> wrote:
Bob,

I don't write code. Your pseudocode "looks" good.
At one time I could program in Basic, Pascal, and Frotran, but I haven't
written anything for a very long time.

I'm beginning to think that I didn't understand the original question
correctly.

I have a report that I have been using since 1998 that has 32 text boxes.
Four rows with eight to a row. The number of lines in each text box can vary
from zero to 14. All text boxes are set to height = 0.05 and both can grow and
can shrink = Yes. If text box number 3 has 14 lines while numbers
1,2,4,5,6,7,8 all have something less than 14 lines, then text boxes 9 thru 16
will all be displaced down so as to clear the bottom text box 3 and the tops of
boxes 9 thru 16 will all be in line with each other. Same result for boxes 17
thru 24 and boxes 25 thru 32. I have two horizontal lines. One above the top
row and one below the last row.

Just a wizard prodder
Chuck
--
Chuck <li*****@schoollink.net> wrote in
news:nf********************************@4ax.com :
Edson,

How do you know all the boxes are not growing at the same
time?

You don't have to be Edson to know that horizontally allingned
text controls with can_grow set true will each grow to the
height determined by their contents. Using .borders will not
make a straight line across the row.. What has to be done is use
unbordered textboxes, and draw the lines in the section.print
event of the report.

Pseudocode
store 0 to variable.
for each control update variable if > current variable data.
draw horizontal line at control.top,
and at controlTop+ variable.
draw vertical lines at each control.left, and at
lastcontrol.left+lastleftcontrol.width
Mon, 15 May 2006 10:42:06 GMT, "Edson Peacock"
<pe*********@mchsi.com> they are on the same line and i want
them to all grow if one of them grows.

thanks in advance

Edson

On Thu, 11 May 2006 09:43:51 -0400, Chuck
<li*****@schoollink.net> wrote:

On Thu, 11 May 2006 02:30:34 GMT, "Edson Peacock"
<pe*********@mchsi.com> wrote:

I assume that 12 text boxes 2 " high must be aligned
horizontally. If the boxes are all on one line: In the detail
section, make the tops of all boxes be the same and be greater
than 0 (distance from top of section), height = 2, and can
grow = yes, and can shrink = no.

If the boxes are on multiple rows: Make the tops of the boxes
in each row all the same and at least .0007 below the bottom
of the boxes above. height = 2. can grow = yes, can shrink =
no.

If one of the boxes above grows greater than 2, the entire row
below will be displaced down to clear the tallest box above.

Just a wizard prodder
Chuck



May 16 '06 #8

P: n/a
Chuck <li*****@schoollink.net> wrote in
news:t8********************************@4ax.com:
On Mon, 15 May 2006 21:48:00 GMT, Bob Quintal
<rq******@sympatico.ca> wrote: Bob, I'm beginning to think that I didn't understand the original
question correctly.

If text box number 3 has 14 lines while numbers
1,2,4,5,6,7,8 all have something less than 14 lines, then text
boxes 9 thru 16 will all be displaced down so as to clear the
bottom text box 3 and the tops of boxes 9 thru 16 will all be
in line with each other. Same result for boxes 17 thru 24 and
boxes 25 thru 32. I have two horizontal lines. One above the
top row and one below the last row.


That's fine. It's when trying to add vertical lines around the
various textboxes that the built-in borders fail. The vertical
lines to the left and right of box 3 will go down to line 14,
but box 1 may draw the lines to only the fourth line.
--
Bob Quintal

PA is y I've altered my email address.
May 16 '06 #9

P: n/a
the report is the proof one box has more info in it than another and
therefore is taller than the other 11 boxes
thanks
"Chuck" <li*****@schoollink.net> wrote in message
news:nf********************************@4ax.com...
Edson,

How do you know all the boxes are not growing at the same time?
Mon, 15 May 2006 10:42:06 GMT, "Edson Peacock" <pe*********@mchsi.com>
they are on the same line and i want them to all grow if one of them
grows.

thanks in advance

Edson

On Thu, 11 May 2006 09:43:51 -0400, Chuck <li*****@schoollink.net> wrote:

On Thu, 11 May 2006 02:30:34 GMT, "Edson Peacock" <pe*********@mchsi.com>
wrote:

I assume that 12 text boxes 2 " high must be aligned horizontally.
If the boxes are all on one line: In the detail section, make the tops of
all
boxes be the same and be greater than 0 (distance from top of section),
height
= 2, and can grow = yes, and can shrink = no.

If the boxes are on multiple rows: Make the tops of the boxes in each row
all
the same and at least .0007 below the bottom of the boxes above. height =
2.
can grow = yes, can shrink = no.

If one of the boxes above grows greater than 2, the entire row below will
be
displaced down to clear the tallest box above.

Just a wizard prodder
Chuck

May 16 '06 #10

P: n/a
On Tue, 16 May 2006 02:53:39 GMT, Bob Quintal <rq******@sympatico.ca> wrote:

That is true about the vertical lines or borders. I didn't understand that the
text boxes had to outlined.

Just a wizard prodder
Chuck
--
Chuck <li*****@schoollink.net> wrote in
news:t8********************************@4ax.com :
On Mon, 15 May 2006 21:48:00 GMT, Bob Quintal
<rq******@sympatico.ca> wrote: Bob,

I'm beginning to think that I didn't understand the original
question correctly.

If text box number 3 has 14 lines while numbers
1,2,4,5,6,7,8 all have something less than 14 lines, then text
boxes 9 thru 16 will all be displaced down so as to clear the
bottom text box 3 and the tops of boxes 9 thru 16 will all be
in line with each other. Same result for boxes 17 thru 24 and
boxes 25 thru 32. I have two horizontal lines. One above the
top row and one below the last row.


That's fine. It's when trying to add vertical lines around the
various textboxes that the built-in borders fail. The vertical
lines to the left and right of box 3 will go down to line 14,
but box 1 may draw the lines to only the fourth line.


May 16 '06 #11

P: n/a
On Tue, 16 May 2006 03:41:07 GMT, "Edson Peacock" <pe*********@mchsi.com>
wrote:

Edson,

If the boxes must be outlined, and all the outlines must be the same size
regardless of the amount of data in the boxes, then my suggestion will not
satisfy the requirements. You will have to write some code as Bob Quintal
suggested. On the other hand you could make all the boxes a fixed height of 3
inches. From what you have written, it appears that at least one of the 12
boxes is likely to require the 3 inches.

Somehow, I think that I still don't understand the original question properly.
If so, then the fault is mine, not yours. I've been told that I think
differently than everyone else.

Also see: http://www.lebans.com He has something there with complete code
about drawing vertical lines that grow. Then you will have to draw horizontal
lines tops and bottoms to complete the boxes.

Just a wizard prodder
Chuck
--
the report is the proof one box has more info in it than another and
therefore is taller than the other 11 boxes
thanks


May 16 '06 #12

This discussion thread is closed

Replies have been disabled for this discussion.