RTF2 ActiveX control stretches text in reports

P

Pat Richards

I am a fairly new user of the RTF2 ActiveX control, by Stephen Lebans,
and I am having a lot of trouble printing reports. I am using
Microsoft Access 2003 on Windows XP Pro SP2.

I have written an Access application that allows teachers to create
tests from questions stored in a table. Individual questions are
created by entering text, graphics, etc, into an RTF control that is
bound to a Memo field in the Question table. The report for printing
tests contains one RTF2 control in the Detail section that is bound to
the question Memo field.

I am having a problem I just can't figure out. If more than 2
questions are returned by the report query, sometimes the question is
stretched across part of the page. For instance, the following text:

What is the equation for a circle?

Appears as:

W hat is the e q u ation f or a circl e ?

The effect is different based on the number of questions in a test. I
have never seen this problem for a test with only 1 or 2 questions. I
see this almost every time for tests with 3 more more questions and
only some questions are affected. In other words, I really don't see a
patter or reason for this to happen.

If anyone has seen this problem or has any suggestions, please let me
know! I have recreated the form questions are entered with and I have
recreated the report several times and I always have this problem.

Thanks,
-Pat
 
S

Stephen Lebans

Here is a previous thread on this issue:

Sharper Feb 4, 1:24 pm show options

Newsgroups: microsoft.public.access
From: "Sharper" <[email protected]> - Find messages by
this author
Date: Fri, 4 Feb 2005 20:24:31 +0200
Local: Fri,Feb 4 2005 1:24 pm
Subject: RTF2 - Formatting Issue "Wo nk y o u t put!"
Reply to Author | Forward | Print | Individual Message | Show original |
Report Abuse

I am using Lebans RTF2 activex control


I have a formatting issue:


I have a form with separate RTF2 controls - one each in the header /
detail
/ footer. I am using the auto-resize code on leban's site to resize.


The issue is that the control in the detail section is not formatting
properly.


The first two instances of the control on the section are fine, but the
third seems to have an issue with the font pitch as "I am ge ttin g ou
tput on th e repor t like th is". (If you get my drift!)


Any suggestions as to what the problem might be and a possible fix?


Thanks.


Stephen Lebans Feb 5, 12:39 am show options

Newsgroups: microsoft.public.access
From: "Stephen Lebans"
<ForEmailGotoMy.WebSite.-WWWdotlebans­[email protected]> - Find
messages by this author
Date: Sat, 5 Feb 2005 01:39:04 -0400
Local: Sat,Feb 5 2005 12:39 am
Subject: Re: RTF2 - Formatting Issue "Wo nk y o u t put!"
Reply to Author | Forward | Print | Individual Message | Show original |
Report Abuse

Sharper I thought I already replied to you on this issue in another NG.
Anyhow, here is a post from a thread relevant to your issue:
The entire thread is here:
http://groups-beta.google.com/­group/microsoft.public.access.­activexcon
tr
ol/browse_frm/thread/d56112b5a­72b0c80/e3faa16313d0ca02?q=leb­ans+rtf&_d
on
e=%2Fgroups%3Fq%3Dlebans+rtf%2­6start%3D0%26scoring%3Dd%26&_d­oneTitle=B
ack+to+Search&&d#e3f­aa16313d0ca02


Newsgroups: microsoft.public.access.active­xcontrol
From: Max Moor <maxmoor@remove_hotmail.com> - Find messages by this
author
Date: Thu, 18 Nov 2004 17:54:01 -0800
Local: Thurs, Nov 18 2004 5:54 pm
Subject: Re: replaced text in RTF2 not displaying correctly
Reply to Author | Forward | Print | Individual Message | Show original |
Report Abuse


"


Stephen Lebans"
<ForEmailGotoMy.WebSite.-WWWdo­[email protected]>
wrote in

:


Hi Again Stephen,


I was looking around MSDN for clues, and found something about
text
widths being calculated differently when saving to a .txt or .rtf file.
It
didn't really seem to apply to my issue, but it made me reflect that
I've
never tried different fonts to see what happens.


I've been using MS Sans Serif all along. I switch to another
font,
and VIOLA! Everything printed correctly! I have a billion fonts on
here,
and have only checked a few. Here's a sampling:


TT Verdana Regular good, Bold bad
TT Times New Roman All Bad
S Sans Serif All Bad
A Lucida Sans All Good
O Garamond All Good
S Fixed Sys All Bad
O Courier New All Good
O Ariel All Bad


where 'O' and 'TT' are true type, 'A' are adobe fonts, and 'S' are
system
fonts.


I'll keep looking into things, but I'm getting close to parts of
the
system that are "magic boxes" to me, like character formatting and such.
If this extra info sparks any thoughts with you, I'd sure like to hear
them.


TTFN, Max


--


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







- Hide quoted text -
- Show quoted text -
I am using Lebans RTF2 activex control
I have a formatting issue:

I have a form with separate RTF2 controls - one each in the header / detail
/ footer. I am using the auto-resize code on leban's site to resize.

The issue is that the control in the detail section is not formatting
properly.

The first two instances of the control on the section are fine, but the
third seems to have an issue with the font pitch as "I am ge ttin g ou
tput on th e repor t like th is". (If you get my drift!)

Any suggestions as to what the problem might be and a possible fix?

Thanks.



Sharper Feb 5, 2:15 am show options

Newsgroups: microsoft.public.access
From: "Sharper" <[email protected]> - Find messages by
this author
Date: Sat, 5 Feb 2005 09:15:48 +0200
Local: Sat,Feb 5 2005 2:15 am
Subject: Re: RTF2 - Formatting Issue "Wo nk y o u t put!"
Reply to Author | Forward | Print | Individual Message | Show original |
Report Abuse

Thanks for that. I'm sorry, I did post to one other NG, but I didn't see
any
reply there - my news server has been a bit tempermental though!


I had been working away at this last night and had reached the
conclusion
that it was something to do with the font type / size.


I managed to get a workaround for it, but I'm not sure why it works!! I
also was generating the rtf on the fly, but what I did was increase the
font
size in the rtf string. By trial and error I found that if I was trying
to
display Arial 9 on the report (ie setting the font properties in the
control
on the report) , if I increased the font size in the rtf string to fs24
(Arial 12) then it would display perfectly. The closer the fs got to
the
actual display font size on the control, the worse the problem. If the
font
size in the rtf string was less than that on the control on the report,
the
text was practically unreadable - two or three words would be spread
across
the whole page.


I don't know if someone else can use this information to investigate the
problem further, but in the meantime I have an acceptable workaround to
the
problem.


Thanks for your help.


"Stephen Lebans"
<ForEmailGotoMy.WebSite.-WWWdo­[email protected]>
wrote in message


- Hide quoted text -
- Show quoted text -



--

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

Pat Richards

Thank you for your quick response. RTF2 is a really cool control and I
know I can't beat the price! I have spent some time trying different
fonts and sizes and this seems to correct the issue. I was hoping to
use Times New roman 10 point, but that is what is giving me all of the
trouble. Using a different font, such as Courier New, I have not seen
any problems.

Thanks,
-Pat
 
P

Pat Richards

I have found a successful workaround to my original problem. There are
two parts. first of all, the choice of font seems to make a big
difference. I have seen the spacing issue with different fonts, such
as Times New Roman, Arial, and Courier New. However, Times New Roman
is the worst and courier New is the best. I have set the default font
to Courier New 12, since that is acceptable and even preferable for my
application. The second part of the fix is to leave all of the
settings for the RTF2 control at default values. I was setting the
font to match the font I used in the RTF2 controls on forms. This does
not seem to be at all necessary and actually causes the spacing issue
in my qppliction.

Thanks for the help and the great control!

-Pat
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top