Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Sending Powerbuilder datawindow as an e-mail in the body

1,553 views
Skip to first unread message

Jasvinder

unread,
Nov 20, 2009, 3:33:17 PM11/20/09
to
Hi ,

I am trying to create an e-mail with the RICH Text content
of a datawindow in the body of the e-mail

Attachments are not allowed , save as PDF not allowed.

Is there a way to send the contents of the datawindow as a
rich text interface via the body of the e-mails without
attachments ?

Thanks,
Jas

Roland Smith [TeamSybase]

unread,
Nov 20, 2009, 3:46:16 PM11/20/09
to
You can get the datawindow contents as HTML and use it as the body.

The built-in MAPI email functionality does not support HTML email.

I have a SMTP email object you can use that supports HTML email.

http://www.topwizprogramming.com/freecode_emailsmtp.html

I have used this code to generate HTML from a datawindow.


// set html properties
dw_viewer.Modify("datawindow.HTMLTable.GenerateCSS='yes'")
dw_viewer.Modify("datawindow.HTMLTable.NoWrap='yes'")
dw_viewer.Modify("datawindow.HTMLTable.border=0")

// format the html
ls_html = "<HTML>~r~n<HEAD>~r~n"
ls_stylesheet = dw_viewer.object.datawindow.HTMLTable.StyleSheet
ls_html += ls_stylesheet + "~r~n</HEAD>~r~n<BODY>"
ls_html += dw_viewer.object.DataWindow.data.HTMLTable
ls_html += "~r~n</BODY>~r~n</HTML>"


Chris Pollach

unread,
Nov 26, 2009, 2:04:47 PM11/26/09
to
Hi Alastair;

Can you send it as a PDF instead as that format handles nested DWO's?

--
Regards ... Chris
ISUG - NA RUG Director
Blog: http://chrispollach.pbdjmagazine.com
SourceForge: http://sourceforge.net/projects/stdfndclass


"Alastair Walker" <spi...@mweb.co.za> wrote in message
news:sm9tg5l44236h72tg...@4ax.com...
> Hi - Roland - thanks for the guidance below.
>
> But I have a question.
>
> The user manual indicates that nested reports are ignored.
>
> I have a datawindow that I need to generate html from, but it has
> nested reports.
>
> Is there any recommended work-around in this situation?
>
> Many thanks,
>
> Alastair Walker
>
> On 20 Nov 2009 12:46:16 -0800, "Roland Smith [TeamSybase]"

Alastair Walker

unread,
Nov 27, 2009, 1:36:14 AM11/27/09
to
Hi - Chris - thank you for the reponse.

My real problem is the following:

I want to format a report that I can include as an object into a Word
file.

The importred report must be in a format that can be recognised by
Word, and with attributes that can be acted upon.

So image formats, and pdf are not going to work for me.

I have considered trying to use RTF as a format, but the rtf
facilities in a dw are very limited from a formatting perspective.

The next best option seems to be html - which I can import into Word.

The problem I have run up against is that the dw html conversion
facilities seems to ignore embedded reports - which I do make use of.

I guess my best approach will be to try and generate the report
without using the embedded reports feature.

Best regards,

Alastair

On 26 Nov 2009 11:04:47 -0800, "Chris Pollach"

Chris Pollach

unread,
Nov 27, 2009, 8:07:11 AM11/27/09
to

I would then recommend using a new DWO that is tailored to your export
needs. Run this inside a DataStore and transfer the data from the
composite/nested report to the DS. Once the data has been loaded use the
DS.SaveAs ( html!) and you should have it all together for what ever
software. The only draw back here is writing some code to transpose the data
from the nested DW's over to the DS.

HTH

"Alastair Walker" <spi...@mweb.co.za> wrote in message

news:26sug5htbuk6aplvf...@4ax.com...

Terry Dykstra [TeamSybase]

unread,
Nov 27, 2009, 10:47:50 AM11/27/09
to
dw2xls can handle nested reports. So use that utility to save to Excel.
You can insert the Excel doc into Word.
http://www.desta.com.ua/dw2xls/

--
Terry Dykstra (TeamSybase)
http://powerbuilder.codeXchange.sybase.com/
http://casexpress.sybase.com
product enhancement requests:
http://my.isug.com/cgi-bin/1/c/submit_enhancement

"Chris Pollach" <cpol...@travel-net.com> wrote in message
news:4b0fceff@forums-1-dub...

Alastair Walker

unread,
Nov 27, 2009, 12:28:41 PM11/27/09
to
Many thanks to Terry and to Chris for the very informative and helpful
responses! I will try these excellent ideas out!

Regards,

Alastair


On 27 Nov 2009 07:47:50 -0800, "Terry Dykstra [TeamSybase]"

0 new messages