RTF2 Printing

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have downloaded and installed the RTF2 control and it works great. I really hate posting here and bothering everyone, but I need some help
I posted a couple of days ago about needing to figure out how to print 9 different RTF control boxes on my report. Stephen replied to my post about making a change to the canGrow(n) parameter
I have spent 2 days trying to get this to work and can't seem to do it. I see the code where it talks about height and the control object. I am not sure what to do at this point. I need help getting one fixed and I can take it from there.
Any help you can give would help me finalize this project.
 
Post the code you currently are working with and I'll have a look at it
for you.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.


Todd said:
I have downloaded and installed the RTF2 control and it works great.
I really hate posting here and bothering everyone, but I need some help.
I posted a couple of days ago about needing to figure out how to print
9 different RTF control boxes on my report. Stephen replied to my post
about making a change to the canGrow(n) parameter?
I have spent 2 days trying to get this to work and can't seem to do
it. I see the code where it talks about height and the control object.
I am not sure what to do at this point. I need help getting one fixed
and I can take it from there.
 
I have a dumb question (Like the others have been inteligent).
In the datasource for this field, could I not just combine all the memo fields into the one field? WOuld that work?
 
There is a 22 inch(roughly 3 pages) maximum that you can size the height
of any ActiveX control on an Access report.
Really though, I will ask you one last time, please post the code you
are working with and I will be glad to help you along. We'er only
talking about changing a couple of lines of code to get things working
as per your current setup.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.


Todd said:
I have a dumb question (Like the others have been inteligent).
In the datasource for this field, could I not just combine all the
memo fields into the one field? WOuld that work?
 
I am not sure if I am in the right area even. The only section I saw was the Height section under the code area.
The first part is obviously your code which is working perfectly. I copied the entire section and change the control from RTFControl to RTFmemosetup which is what the field is called.
I was not sure if I needed to change the Height integer to Height2 and so forth for every field or what. I am so lost on this one.

Dim Height As Integer
Dim Height2 As Integer

Height = Me.RTFControl.Object.RTFheight
If Height > 0 Then
If Height < 32000 Then
Me.RTFControl.Height = Height
End If
End If
Me.Section(acDetail).Height = Me.RTFControl.Height + Me.RTFControl.Top

If Me.RTFControl.Object.RTFheight > 0 Then
If Me.RTFControl.Object.RTFheight < 32000 Then
Me.RTFControl.Height = Me.RTFControl.Object.RTFheight
End If
End If




Height = Me.RTFMemoSetup.Object.RTFheight
If Height > 0 Then
If Height < 32000 Then
Me.RTFMemoSetup.Height = Height
End If
End If
Me.Section(acDetail).Height = Me.RTFMemoSetup.Height + Me.RTFMemoSetup.Top

If Me.RTFMemoSetup.Object.RTFheight > 0 Then
If Me.RTFMemoSetup.Object.RTFheight < 32000 Then
Me.RTFMemoSetup.Height = Me.RTFMemoSetup.Object.RTFheight
End If
End If
 
Jeeze Todd, I just had a look at the code behind the sample Reports and
I had a hard time understanding it!<grin>
I just posted some updated code on my site to support resizing for
multiple RTF2 controls. In the example the controls are named

Here is code to support resizing of multiple RTF2 control in the same
Detail section.
The example assumes two RTF2 controls named "RTFControl" and
"RTFControl2".

Private Sub Detail1_Format(Cancel As Integer, FormatCount As Integer)

' Height of the current RTF2 Control
Dim Height As Integer
' Max height to allow for multiple RTF2 controls
Dim MaxHeight As Integer

' Init MaxHeight
MaxHeight = 0

Height = Me.RTFcontrol.Object.RTFheight
If Height > 0 Then
If Height < 32000 Then
Me.RTFcontrol.Height = Height
'Me.Section(acDetail).Height = Me.RTFcontrol.Height + Me.RTFcontrol.Top
If MaxHeight > Me.RTFcontrol.Height + Me.RTFcontrol.Top Then MaxHeight =
Me.RTFcontrol.Height + Me.RTFcontrol.Top
End If
End If


Height = Me.RTFControl2.Object.RTFheight
If Height > 0 Then
If Height < 32000 Then
Me.RTFControl2.Height = Height
'Me.Section(acDetail).Height = Me.RTFControl2.Height +
Me.RTFControl2.Top
If MaxHeight > Me.RTFControl2.Height + Me.RTFControl2.Top Then MaxHeight
= Me.RTFControl2.Height + Me.RTFControl2.Top
End If
End If

' Now set the Detail Section's Height to the Maximum calculated value.
Me.Section(acDetail).Height = MaxHeight
End Sub


--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.


Todd said:
I am not sure if I am in the right area even. The only section I saw
was the Height section under the code area.
The first part is obviously your code which is working perfectly. I
copied the entire section and change the control from RTFControl to
RTFmemosetup which is what the field is called.
I was not sure if I needed to change the Height integer to Height2 and
so forth for every field or what. I am so lost on this one.
 
Back
Top