473,804 Members | 3,638 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CanGrow

2 New Member
All textboxes across the record are set to CanGrow, in the details section of a continuous subform of a report, yet different fields grow to varying heights and messy borders.

Is it possible to configure all textboxes to follow the same height of their tallest peer in the same record?

TIA!

Sep 23 '06 #1
3 3294
PEB
1,418 Recognized Expert Top Contributor
Difficult.... Hard ...

But if u create a function that updates the other fields to the len of the bigger field with intervals....

There is a lot of calculations to do this...

You need to know the max rows of every field and synchronize the other with...

However with code you can do it...

:)
Sep 23 '06 #2
BoxTop
12 New Member
You can put a bit of code into the OnFormat event for the detail section of your report.

If Me![TextBox1].Height > Me![TextBox2].Height And Me![TextBox1].Height > Me![TextBox3].Height Then

Me![TextBox2].Height = Me![TextBox1].Height
Me![TextBox3].Height = Me![TextBox1].Height

ElseIf Me![TextBox2].Height > Me![TextBox1].Height And Me![TextBox2].Height > Me![TextBox3].Height Then

Me![TextBox1].Height = Me![TextBox2].Height
Me![TextBox3].Height = Me![TextBox2].Height

ElseIf Me![TextBox3].Height > Me![TextBox1].Height And Me![TextBox3].Height > Me![TextBox2].Height Then

Me![TextBox1].Height = Me![TextBox3].Height
Me![TextBox2].Height = Me![TextBox3].Height

End If


Of course you will need to insert the actual names of your text boxes but hopefully you will get the idea. Please let me know how you get on.
Sep 23 '06 #3
PEB
1,418 Recognized Expert Top Contributor
It seems a very very good idea! :)

But when you try it with the CanGrow property, the Height property shouldn't calculate the CanGrow option and the actual height of the field!

I've tried a report with 2 Fields and this code:

Expand|Select|Wrap|Line Numbers
  1. Me![Key_element].Height = Me!COL01N0002.Height
  2.  
Where Me![Key_element] is placed always on one row and Me!COL01N0002 is placed always on multiple rows using cangrow property


So to get a working function you need to know in which field what number of symbols are stored on one row with the specified formatting...

But in this case you are doing programatical CanGrow and you can desactivize the can grow property!

:)
Sep 23 '06 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2507
by: Wally | last post by:
Hi All, I'm using Stephan Lebans' nifty code for automatically resizing text fields to the size required to show (almost) all text in that field (CanGrow3, thanks Stephen!). In general this function works great. However, I sometimes have a problem with the last text line. Often the last line is just below the end of the field and to view that line I have to scroll to it. Is that a known problem? And is there a solution?
3
1618
by: Andy Warner | last post by:
Hi all, I am generating a report that adds one of two images (or no image at all) depending on query results. I dont want a great big blank space where the image goes, if NO IMAGE is returned..... Any way I can do this? I know I cannot use 'can grow' as I do with text boxes. any help appreciated. andy
1
8365
by: Phil Stanton | last post by:
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...
2
2856
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 footer), it shows just 1 column and spills over to 5 pages. I've tried moving the subreport to the detail band: no go. All bands/objects are set to Grow and Shrink. Any ideas?
3
2536
by: Not Me | last post by:
Hi, I have a report, viewable in continuous form. I don't want the size of the report to change (it should fit address labels on the printer), but in order to minimise the space between empty fields I shrink the text boxes, bunch them together and set cangrow to on. E.g. instead of this: Some name
0
1111
by: mosscliffe | last post by:
I have data in a memo/text field which has linefeeds in it. When I use a multiline textbox, it recognises the line feeds and displays correctly. If I use a label it just sees it as one continuous data stream. Some of my fields have no data in them or only one or two lines, so is it possible to to set a property like CanShrink CanGrow, which i think was in Access or do I have to work out the lines and set the textbox row count to that.
0
1127
by: Randy Smith | last post by:
Hi ALL, Is there a property that will shrink or grow the size of my GridView, based on the number of rows? For instance, I've set the PageSize to 7, but oftentimes I'll only have one row of data. Since I have other fields on the aspx form, I don't want to waste the space unless absolutely necessary. Many thanks, Randy
4
2739
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 the row can be longer than its text-box on rare occasions, so I've made the text-box and detail section CanGrow properties = Yes. This has had one positive effect - the occasional long field now displays correctly, split over 2 rows - but also a...
1
9493
by: gandhi.vishal | last post by:
Hello, I have an issue. I'm not seeing the reportviewer data at all. The column names come up fine but there is no data in the report table. Here is what I'm doing I created a dataset with the following query select * from av_project_mst where apm_project_id=@projectid Now I created a report (.rdlc) and dragged a table onto it and the report looks like the following
0
10575
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10330
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9144
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7616
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6851
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4297
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3816
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2990
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.