RTF Control on report (Access 2003)

T

techquest

I am using Access 2003 and Leban's RTF controls. I am creating a
report and need to display several paragraphs worth of text. In some
cases, the paragraphs are stored in the database with RTF controls and
in other cases the paragraphs are being created dynamically. In the
paragraphs that are being displayed dynamically, I need to bold and/or
underline various words, or even indent in some cases. This report
will probably be over 3 pages long, so I am hoping page breaks will
also be handled seamlessly. Can anyone offer any suggestions on how I
can accomplish this using Leban's RTF controls or any other controls
for that matter? Any help would be appreciated. I've searched
various forums, but could not find anything specific to my problem.
 
P

Pat Hartman

I don't have a link handy but you can download the .rtf spec from the
Microsoft site. RTF is a plain text format. If you open an .rtf document
with notepad, you will see the formatting tags. If I need to do some
formatting via code, I create a simple document with word and apply only the
formatting I am interested in. Then I save the document and reopen it with
notepad to see the tags I need to surround the text with. When Word creates
a RTF document, it uses a lot of header coding that isn't technically
necessary so you will need to play with the document to determine the
minimum amount of coding you need to provide.
 
P

PatientCoder

It's not possible, period, with anyRTFcontrol, as an Access report limits
the max size you can programmatically set a Section Height to, of 22 inches.

Your only recourse would be to upgrade to Access 2007. This version contains
a nativeRTF(really HTML)controlthan supports CanShrink/CanGrow across
multiple pages. Be advised that only limited formatting support is
available.

--

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






- Show quoted text -

Thanks for your guidance. I tried my rtf controls in a trial version
of Access 2007 and it worked fine...paging was seamless. I do have
another question. Is it possible to control paging from within the
rtf control? In other words, I may want to force a new page in the
middle of a paragraph. Do you have any suggestions on how that can be
accomplished? It does not seem that the rtf control supports paging.
 
P

PatientCoder

AFAIK it is not possible. The RTF features are new to this version and very
little has been published on their use. Since the mechanism underlying the
control is HTML I would be very surprised if paging is supported in any
manner.

--

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






- Show quoted text -

If I inserted a unique combination of characters into my RTFcontrol
while it is being populated, will it be possible for me to later parse
the string (maybe in the On Print event) and somehow generate a page
break? This may be at stretch, but if it is possible I would be
willing to try it. If you have any other suggestion that may require
vba coding, I would be willing to try.
 

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