1. Sivaprakash BKR
  2. PowerBuilder
  3. Tuesday, 15 November 2022 11:47 AM UTC

Hello,

Using PB 2019 R3

Planning to use word (.doc) file for this mail merge facility.  Every page consists of three parts,
1.  Header
2.  Detail 
3.  Footer

Header consists of Company Name, Logo, Company Address, Order No. and Date
Detail consists of table with Item Details (Multiple) columns Sl No., Item Name, Unit, Quantity
Footer consists of Regular Instructions, Special Instructions, Space for Signature

I can replace Header part and Footer part variables with values.   Need a way to replace the detail part (table) with list of items.

Any idea or code snippet will be useful.

Happiness Always
BKR Sivaprakash

 

 

Sivaprakash BKR Accepted Answer Pending Moderation
  1. Wednesday, 16 November 2022 05:32 AM UTC
  2. PowerBuilder
  3. # 1

Thanks Chris,

When I tried RMB on any field on RT datawindow, I could not see any option to set 'slide' properties.   This is what I get when I Right Click a field on a field in  RT datawindow. 

Or Am I missing something?   Nevertheless I haven't set any 'slide' properties.

Happiness Always
BKR Sivaprakash

 

Comment
There are no comments made yet.
Sivaprakash BKR Accepted Answer Pending Moderation
  1. Tuesday, 15 November 2022 13:44 PM UTC
  2. PowerBuilder
  3. # 2

Thanks Chris,

That's what we tried first. 

1.  In our initial trial attempt we got the following (misaligned) output (Header Band)   
See 'Order Date' Position, it moves to right even though we placed it at the same Y position of Order No.   Even 'Delivery Date' has moved further.


2.  The same misalignment in Detail band too.   Here below is the design

And the corresponding output

3.  And we need a way to allow edit of the output to type out any special instructions at Footer band.  Need to find a way to allow edit of the same.

Any solution?

Happiness Always
BKR Sivaprakash

 

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 15 November 2022 14:11 PM UTC
Make sure that you have not turned on any "slide" properties. ;-)
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 15 November 2022 13:14 PM UTC
  2. PowerBuilder
  3. # 3

Hi BKR;

   FYI; That's exactly what the RichText DataWindow was designed for.  ;-)

   You can also use a RT control & share the data with a DWO within a DataStore as well.

   Of course, you can also use the more complex OLE route to get exactly what you need from MS-Word templates.

Regards ... Chris 

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Tuesday, 15 November 2022 12:47 PM UTC
  2. PowerBuilder
  3. # 4

Hi Sivaprakash,

We use a richtext control which we then export to html and send by email. Depending on which version of the rt control you might have, this can be easy or buggy. I think that pb 2022 R2 is going to bring some improvements to the RT, but if you really want to be solid, I'd recommend using an html editor like tinymce, which you can use in a webbrower control.

regards.

Comment
  1. Miguel Leeuwe
  2. Tuesday, 15 November 2022 12:51 PM UTC
For example I'm not sure if the SaveDocument function exports tables correctly to html. (what we do, is insert marker fields to indicate a header with columns and rows. After exporting to html, we then edit the html to fill in values for those, before doing the send).

Also, any images might or might not show correctly when you copy them and paste them into the RTE control. ("might" means depending on where / which program you copied the image from). I know .... The image thing should improve with pb2022 (R2 ?) if I'm not mistaken.
  1. Helpful
  1. Sivaprakash BKR
  2. Tuesday, 15 November 2022 13:12 PM UTC
Thanks Miguel,

So we need to code to replace the Item List, after exporting to html. May be the same way if we maintain those templates in Word (.doc) format.
  1. Helpful
  1. Miguel Leeuwe
  2. Tuesday, 15 November 2022 13:18 PM UTC
hi,

I think Chris suggestion of using a RT datawindow instead of a control might be worth giving it a try. See what happens when you export it to HTML. Personally, we don't use a dw because we use templates onto which the user can drag fields.

  1. Helpful
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.