473,399 Members | 2,858 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Report textbox height after CanGrow has been activated

I am trying to create a text box in Word the same height as one on a report
and then fill it with text.
I can "read" the position of the text box from the report OK and create a
text box in Word with the correct position, but it's size is identical to
the size of the "ungrown" text box on the report. I need to create the text
box in Word the same size as the grown text box on the report.

So, in Design view the report has a text box about 1cm (570 twips) high.
It's properties are CanGrow yes and CanShrink yes. It is bound to a memo
field. Sometimes the box is big enough to hold all the data, but more
frequently it will have to grow to up to 10cms high to accommodate the
data..

I need to create the text box in Word the same size as the report textbox in
print or preview mode ie from 1cm to 10cms high in order to hold the data.

I have tried using OnFormat MyReport.TextHeight(MyMemo) but that only gives
the original textbox height.

Can anyone help

Thanks

Phil
Nov 12 '05 #1
1 8299
You need to do a function OnPrint, because that is when the new height for
the textbox is computed, I was experiencing the same problem not too long
ago...you need to manually draw the boxes using the line functions. This
will work if you have a main report or subreports embedded in a main report.

intMaxSize = Me.Detail.Controls.count - 1

For intI=0 to intMaxSize
Set propertiesStorer(intI) = Me.Detail.Controls.Item(intI)
Next intI

// For loop of leftStorer = propertiesStorer(intI).Left
// For loop of heightStorer = propertiesStorer(intI).Height
// For loop to find the maxHeight
// For loop to Draw lines such that Me.Line (leftStorer(intI),0) -
(leftStorer(intI),maxHeight)
// Me.Line (Me.Width,0) - (Me.Width, maxHeight) to draw the final right
outside edge
// Me.Line (0, maxHeight) - (Me.Width, maxHeight) to draw lines to separate
the records

Hope this helps.

--
Travis Cornwell
Computer Science Coop
REM Services Inc.
tw******@ncsu.edu

"Phil Stanton" <ph**@stantonfamily.co.uk> wrote in message
news:3f*********************@mercury.nildram.net.. .
I am trying to create a text box in Word the same height as one on a report and then fill it with text.
I can "read" the position of the text box from the report OK and create a
text box in Word with the correct position, but it's size is identical to
the size of the "ungrown" text box on the report. I need to create the text box in Word the same size as the grown text box on the report.

So, in Design view the report has a text box about 1cm (570 twips) high.
It's properties are CanGrow yes and CanShrink yes. It is bound to a memo
field. Sometimes the box is big enough to hold all the data, but more
frequently it will have to grow to up to 10cms high to accommodate the
data..

I need to create the text box in Word the same size as the report textbox in print or preview mode ie from 1cm to 10cms high in order to hold the data.

I have tried using OnFormat MyReport.TextHeight(MyMemo) but that only gives the original textbox height.

Can anyone help

Thanks

Phil

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Phil Stanton | last post by:
Yes I know it can't be done in an editable form - well maybe not. Assuming I have a report textbox with CanShrink and CanGrow set to yes, is ther any way of calculating the length the textbox...
3
by: Edward | last post by:
ACCESS 2k I need to design a report based on a rota system for staff at various shops. The data is effectively stored in a single table, along the lines of: Initials (e.g. BH, FG, RM etc.)...
2
by: DFS | last post by:
Main report contains one large graph in the detail band (no detail records). Subreport snakes just fine (5 columns) when opening by itself. When I add it to the main report (in the report...
5
by: (Pete Cresswell) | last post by:
I've got this little app that tracks metadata from about a dozen different systems and feeds. Seems to have all the mapping info that's needed to follow a data element from one place to...
13
by: Greg | last post by:
Most suggestions on this topic recommend to use a page footer and make it visible only on the last page. My problem is that the footer is half of the height of a page which means the detail would...
4
by: D.Stone | last post by:
I am having problems formatting an Access 2003 report which is trivial in the extreme (tabular layout, 9 fields from 1 table per row in the detail section, no groups/totals). One field (only) in...
1
by: Andrus | last post by:
I have rdl report in xml like below. I need to wrap all label <Valuetag contents to =Res.IR method call. For example <Value>ProductId</Value> should be replaced with ...
6
by: evenlater | last post by:
I've got a report with memo fields set to "CanGrow". Next to this text box is a combo box. I want the combo box to be as tall as the text box after it grows. I've tried the following in my code: ...
3
by: kstevens | last post by:
I have created a report that looks like a spreadsheet. The only problem is that when one of the cell grows (cangrow property is yes) then the lines beside them are not long enough. I tried this...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.