RTF2 Runtime Confusion

D

dynamicpool

I am using the Lebans RTF2 ActiveX in my application to produce formatted
text on my report in a special text situation.

The formatting is being done in a class outside of nthe report and is called
into the report in the On Format event for the detail section.

This is working fine on my development computer, however, when I package it
I am not getting anything on screen in report preview inside the rtf
control.

I have included the required dll's as well as the OCX control. I have a
letter writer as well which is taking advantage of this control, and
although the functionality is present i.e.: I cna change fonts, make bold
etc, the control is not recalling saved letters that are preformatted
either.

The values are being fed to the letter writer form and the report in a
similar fashion. Typical code snippet is:

MsgBox strHolddps & " is what is being fed to the report"

Me.rtfRecommend.RTFtext = "{\rtf" & _
strHolddps & _
"}"

MsgBox "RTFRecommend is " & Me.rtfRecommend.RTFtext

The second message box is returning the expected values.

The format of the typical input is:
{\rtf1\ansi\ansicpg1252\deff0\deflang3081{\fonttbl{\f0\fswiss\fprq2\fcharset
0 System;}}
{\*\generator Riched20
5.40.11.2210;}\viewkind4\uc1\pard\tx1440\tx2880\tx4320\tx5760\tx7200\tx8640\
tx10080\tx11520\tx12960\tx14400\tx15840\tx17280\tx18720\tx20160\tx21600\tx23
040\tx24480\tx25920\tx27360\tx28800\tx30240\tx31680\tx33120\tx34560\tx36000\
tx37440\tx38880\tx40320\tx41760\tx43200\tx44640\tx46080\b\f0\fs20 We are
testing the function to see what happens\par
}

The letter writer saves directly to the table the output of RTF2, the class
writes the formatting as it goes.

I also tried running the RTF2 download from Lebans site on the target
machine to eliminate packaging as the issue. This seems to make no
difference.
 
S

Stephen Lebans

I do not have a runtime only install here so it may be tough for me to
debug. A couple of things:

1) Verify that your RTF data is valid. Copy the generated RTF string
into a blank NOTEPAD file. Save it as Test.RTF. Open the saved file in
WordPad or MSWord. Verify the RTF output is correct.

2) What version fo WIndows and Access are you using?

3) If you bind the Control to the table containing the RTF data you
generate on the fly does it make any difference>

Let me know.
--

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

dynamicpool

Thanks for the prompt response Steven. The rtf generated is as follows
(this is short version for you).

{\rtf\b 1: \b0\ Leave filter running until all steps are complete \par\
\b 2: \b0\ Please add \b 680 millilitre of \b0 \b Pool King Hcl Acid\b0
to correct your pH \par}

I am using Access 2002, and packaging with Sagekey Runtime and Wise
solutions and my test machine is Windows 98 second edition.

The report output cannot be bound to a table as the data is never kept only
the incoming information to generate the data is kept. The letter writer is
possible to bind and I will try that later today.

I tried opening the string with wordpad and it gives me the same output I am
seeing. Is there a format issue here with the \rtf\b?
 
S

Stephen Lebans

Off the top of my head your RTF header is wrong.
Create the formatted text string in Wordpad. Save the file then open it
in TextPad to see the raw RTF codes.

Are you sure that the target systems have the proper version of the RTF
DLL installed? THis is explained on my Web site. Scroll down the page a
bit for a full explanation.

Let me know.
--

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

dynamicpool

Thanks for that Steve

I changed the header information to match a wordpad generated header,
however it sill isn't working.

I checked the RTF version on the target machine and the files seem to match.

The install already includes the windows Installer Update.

I thought I'd eliminate the installer option by talking to Sagekey, however,
they are not there for another 30 hours or so.

Have any users reported using this ActiveX in a runtime environment?
 
S

Stephen Lebans

Yes, I have had several Email's reporting the use of the control in a
Runtime only environment.

--

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

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

Similar Threads

RTf2 Lebans 5
RichText in a "classic" TextBox 2
Lebans RTF Control Content to Outlook 1
RTF2 Control 1
Question about using RTF2 control with merge 3
u 4
uncleared code 2
First line in rtf file and font 14

Top