1. Brett Weaver
  2. PowerBuilder
  3. Monday, 18 November 2019 20:46 PM

Hi There

Should I give up on trying to create a new RTF datawindow or is there some special way I need to implement Rich Text Format?

The IDE crashes on a regular basis opening and closing a new RTF window  which I created to try to do a mail merge

No special formatting added yet, just a logo on the header line (tried both jpg and png) and about 12 columns from a sql query as fields.

My clients all have Word installed and I'm thinking of using that for the mail merge but its a lot more indirect and I need a direct answer: If I am creating a new function should I avoid RTF datawindows?

I'm on Appeon PowerBuilder Universal Edition Version 2019 Build 2082

I've attached the latest datawindow in question. Barely begun I'm afraid.

Cheers

Brett

 

Attachments (1)
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Monday, 18 November 2019 22:33 PM
  2. PowerBuilder
  3. # 1
0
Votes
Undo

Personally we use a rich text edit control, not rte datawindow. It all kind of works okay. I've always had nothing but trouble with datawindow Richtext but maybe others have been more successful or things have improved nowadays.

 

I've tried to import your dw but I'm getting this error:

---------------------------
DataWindow Error
---------------------------
Line 25 Column 95: incorrect syntax.
---------------------------
OK
---------------------------

Does it work for you when you import it into another pbl?

 

Which TX control are you using in your application? (built-in Rich text or built-in TX text)?

maybe it'll help if you create a new empty PBL, copy the dw into it and then attach it here.

Comment
Make sure to use the "built in TX text control" in your application object > other variables > richtext tabpage, because that's the way Appeon is going in future releases.

The "built-in Rich text control" does do some things better than the other one, but then .. has it's own bugs.

Warning: the SelectedText() function, chops off characters of text when the text starts with enters and is followed by enters, although I think it's fixed on 2019. (broken in the beta R2 2019 though!). https://www.appeon.com/standardsupport/search/view?id=3600

Just do a search on the bug site to see if it's really a good solution for you. (most of the bugs also apply to the rte datawindow by the way).



An alternative way, would be to use a HTML editor using the (for now MS) browser control. I think there's some sample of that on topwizprogramming.com by Roland Smith. There are also other html online freeware editors.

Maybe the most secure thing is to use MS Word for now, as your going to need OLE anyway to send your email.



My advice, since you are on 2019 and certain bugs have been fixed, is to simply try it. If it doesn't work, go html or word

or .... do something like what I'm doing, build your own RTE (I'm not totally done with that one though):

https://community.appeon.com/index.php/qna/q-a/outlook-email-using-richertext-activex





  1. Miguel Leeuwe
  2. Monday, 18 November 2019 23:28 PM
Even if you don't want to use my very initial home-grown editor https://community.appeon.com/index.php/qna/q-a/outlook-email-using-richertext-activex, you'll still find all the code you need to send, validate and manage email with outlook (office 64 or 32).

Any questions, let me know.
  1. Miguel Leeuwe
  2. Monday, 18 November 2019 23:31 PM
Okay, I'm going to sleep now: just this last thing, my sample also shows how to embedd / attach images to the email in such a way that most email servers/client won't reject it. (at least for today).
  1. Miguel Leeuwe
  2. Monday, 18 November 2019 23:33 PM
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.