Hi,
I'd like to produce a report that basically looks like an excel printout.
Description:
Profile Print Report
Detail Section with 3 bordered text boxes
all text boxes are 'abutted' against each other (where one ends, the next begins)
all text boxes have the 'can grow' property set to yes.
Detail Section with 'can grown' = yes
Desire:
allow that all 3 cells grow equally.
However, I would like the bordered cells to always be of the same height.
Basically, if one text box is taller than the other 2, the other two have adequate whitespace inside the textbox to cause all 3 to be of equal height.
What event of the detail section can I use so that either all 3 text boxes end up as tall as the detail section or each text box height = the height of the tallest text box after it has 'grown'?
Thanks!
7 13412
Hi,
I'd like to produce a report that basically looks like an excel printout.
Description:
Profile Print Report
Detail Section with 3 bordered text boxes
all text boxes are 'abutted' against each other (where one ends, the next begins)
all text boxes have the 'can grow' property set to yes.
Detail Section with 'can grown' = yes
Desire:
allow that all 3 cells grow equally.
However, I would like the bordered cells to always be of the same height.
Basically, if one text box is taller than the other 2, the other two have adequate whitespace inside the textbox to cause all 3 to be of equal height.
What event of the detail section can I use so that either all 3 text boxes end up as tall as the detail section or each text box height = the height of the tallest text box after it has 'grown'?
Thanks!
Have look at the LINE method in an Access Report to draw a rectangle around each of the text boxes. (examine the arguments that constitute that method, particularly the last argument if you wish to fill the rectangle with a specific colouring)
By looping through the controls you intend to work with ie: referenced in an zero based array you could thus draw a rectangle around each one commensurate with the height of the 'tallest' textbox control referenced.
This would then give the 'appearance' of each textbox having the same height with borders in effect 'drawn' at runtime. (you could set the actual border color property of each control itself to the same as the detail section)
If as you say the textboxes are butted up to each other arranged left to right in the detail section of the report with the controls set to grow, then try the following in the ON PRINT property of the detail section. (I,ll leave you to deal with your own error handling) -
On Error Resume Next
-
Dim lngCounter As Long, dblMaxHeight As Double
-
dblMaxHeight = 0
-
ReDim strcontrol(3)
-
strcontrol(0) = "TheNameOfYourTextBoxOne"
-
strcontrol(1) = "TheNameOfYourTextBoxTwo"
-
strcontrol(2) = "TheNameOfYourTextBoxThree"
-
For lngCounter = 0 To UBound(strcontrol)
-
If Me(strcontrol(lngCounter)).Height > dblMaxHeight Then dblMaxHeight = Me(strcontrol(lngCounter)).Height
-
Next
-
For lngCounter = 0 To UBound(strcontrol)
-
If lngCounter = 0 Then
-
Me.Line (Me(strcontrol(lngCounter)).Left, Me(strcontrol(lngCounter)).Top)-Step(Me(strcontrol(lngCounter)).Width, dblMaxHeight), , B
-
Else
-
Me.Line (Me(strcontrol(lngCounter)).Left, Me(strcontrol(lngCounter)).Top)-Step(Me(strcontrol(lngCounter)).Width, dblMaxHeight), , B
-
End If
-
Next
-
Hope this helps you
Regards
Jim
Jim,
Sorry for the late reply! I have introduced your code and it is near perfect on the first effort! I think I have something in my on print event or the properties of the text boxes that are causing some issues. I will address those and I believe this approach can give me exactly what I need.
Thank you so much and again my apologizes for the late response... I've been away from this project for some weeks.
Jim,
Sorry for the late reply! I have introduced your code and it is near perfect on the first effort! I think I have something in my on print event or the properties of the text boxes that are causing some issues. I will address those and I believe this approach can give me exactly what I need.
Thank you so much and again my apologizes for the late response... I've been away from this project for some weeks.
Glad it helps you. The line method is an appropriate use in reports in your case as a workaround because Access will throw an error if you try to resize a textbox 'in itself' once printing commences using the on format or on print events.
Regards
Jim
This code should do exactly what I am needing for a report I am working on as well. However, I am running into an odd problem. It is acting like the code is grabbing the control height before the can grow property runs. All of the lines are being drawn, but they are drawn to the size of the original text boxes (in the design view), not to the size of the text boxes after the can grow property. Any thoughts?
This code should do exactly what I am needing for a report I am working on as well. However, I am running into an odd problem. It is acting like the code is grabbing the control height before the can grow property runs. All of the lines are being drawn, but they are drawn to the size of the original text boxes (in the design view), not to the size of the text boxes after the can grow property. Any thoughts?
I've never had that issue myself, make sure you have no overlapping controls and that they sit horizontally side by side and that you are using this is the on print property. The 'growing' should be taking place before the on print with the lines drawn to the 'tallest' textbox one in any group
Jim :)
i never expect that it would be so difficult to draw lines on the report. tremendous to understand. unusual programmer . what i had in mind to do is to make spaces on every record. make a new table and fill them all with same amount of data for every record line.
i need to study the code that you presented. anyway thank you
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: dixie |
last post by:
I know I've asked this question in the last week, but no matter how hard I
look, I can't find it. So I'll type it again.
Is it possible to set the height of the detail section of a report using
vba? I want to be able to set the height in a table and have the detail
section adjust to that height, no matter what it is really set to. Is that
feasible, or is it no. If so, what is the syntax for setting the height of
the detail section of...
|
by: Tom |
last post by:
In the Developers Handbook, Getz provides a way to create a survey report
that displays either a line, Yes/No or multiple choice for each question.
It's done by placing three controls (one for each type of answer) in the
report's detail section and then making the control appropriate for each
question visible in the Format event of the detail section. Can this be
simulated in a form? There's no Detail Format event for a form but can it be...
|
by: Lyle Fairfield |
last post by:
I had a Sproc which returned a field called Details.
I had the Form Wizard create a continuous form with the Sproc as the
RecordSource (as a shell for me to modify).
I renamed the Details textbox to txtDetails.
Except I didn't. I grabbed DETAIL from the pulldown and renamed it to
TxtDetail.
|
by: Mal Reeve |
last post by:
Hello,
I have a report that has only 2 levels of grouping.
The detail section is simply 1 large block for a memo field.
I am finding that on some occasions the report errors and generates hundreds
(perhaps even an infinite loop...I have to break the system to stop the
report generating) of pages.
While I'm not 100% I think this may have something to do with the detail
|
by: Tim Marshall |
last post by:
Access 2003. A report of mine was hanging on print preview. It turned
out the issue was a bound text box where the data was too big to fit all
on one page. When I changed the "keep together" property for the detail
section to NO, the report previewed and performed as expected.
However, I'm now faced with a minor irritant I'd like to be able to deal
with. Some other records with far less content in the text box at issue
end up getting...
| |
by: Karl |
last post by:
How do you set the width of a control in the detail section of a report
using the On Format event for the detail section?
|
by: sara |
last post by:
Hi -
Is it possible to hide the detail section of a report at run time?
I have a report that prints all details, with summary lines. The user
would like the report ALSO with just summary lines.
It seems the simplest thing is to run the code (see below) once with
the detail section showing, and a second time hiding the detail
section. I can't figure out the code to do that and don't see it
posted.
|
by: peterkennett |
last post by:
OK, I’m new to all this, so forgive me if I missed some easy answer to this problem!
I have a report, which is actually going to be a letter. I had no problem adding my return address, salutation and top two paragraphs in the HEADER section. I also have no problem with the DETAIL section printing out the few records I need to show. But now I want to add a closing paragraph immediately after the DETAIL section. I tried to add it in the FOOTER...
|
by: emckesso |
last post by:
Hello,
I need to create conditional formatting of a text box in the detail section of a report. The formatting is based on multiple parameters that are stored in a query. For example, pretend that = 50%, = 80%, and = 90%. I will check in the report against (from the query, but currently stored in a text box on the report via a Dlookup - textbox name is still ). If is less than then I want to compare the value of (another report...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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...
|
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...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |