Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

rte_1.DataSource ( ds_rtf_data ) NOT Working

5 posts in Last posting was on 2009-07-22 14:56:46.0Z
Patricia C Posted on 2009-07-20 22:02:38.0Z
From: "Patricia C" <patricia@flee.com>
Newsgroups: sybase.public.powerbuilder.rte
Organization: 164.44.75.3
X-Newsreader: AspNNTP 1.50 (JodoHost)
Subject: rte_1.DataSource ( ds_rtf_data ) NOT Working
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4a64e97e@forums-3-dub.sybase.com>
Date: 20 Jul 2009 15:02:38 -0700
X-Trace: forums-3-dub.sybase.com 1248127358 10.22.241.152 (20 Jul 2009 15:02:38 -0700)
X-Original-Trace: 20 Jul 2009 15:02:38 -0700, vip152.sybase.com
Lines: 36
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.rte:280
Article PK: 791863

Hi,

I'm new to using the rich text edit control in PB and I am trying to merge data
with a rich text datawindow into an RTF file and display it in the
RichTextControl.

In the rtf file I have created a merge tag as such: {SECTION1} and I have the
same column defined in my datawindow {SECTION1}

My code is as follows:
_______________________________________
DataStore ds_rtf_data
long ll_Row

dw_1.SetTransObject(SQLCA)
dw_1.Retrieve(1, 10357)

ds_rtf_data = CREATE DataStore
ds_rtf_data.DataObject = "d_abc"
ds_rtf_data.SetTransObject(SQLCA)
ll_Row = ds_rtf_data.Retrieve()

rte_1.InsertDocument ( "c:\Test_RTF_File.rtf", TRUE )
rte_1.DataSource ( ds_rtf_data )
_______________________________________

Why doesn't this work? I've check the return codes and they are all successful.
My file is not set to read only.

Does anybody have a sample code that performs this merge functionality?

Thanks so much advance,
Patricia

---== Posted via the PFCGuide Web Newsreader ==---
http://www.pfcguide.com/_newsgroups/group_list.asp


KL Posted on 2009-07-21 14:46:59.0Z
Sender: 7f8a.4a648acc.1804289383@sybase.com
From: KL
Newsgroups: sybase.public.powerbuilder.rte
Subject: Re: rte_1.DataSource ( ds_rtf_data ) NOT Working
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4a65d4e2.79e0.1681692777@sybase.com>
References: <4a64e97e@forums-3-dub.sybase.com>
NNTP-Posting-Host: forums-3-dub.sybase.com
X-Original-NNTP-Posting-Host: forums-3-dub.sybase.com
Date: 21 Jul 2009 07:46:59 -0700
X-Trace: forums-3-dub.sybase.com 1248187619 10.22.241.188 (21 Jul 2009 07:46:59 -0700)
X-Original-Trace: 21 Jul 2009 07:46:59 -0700, forums-3-dub.sybase.com
Lines: 42
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.rte:281
Article PK: 791867

Open your doc (in the RTE control), right-click on the
mergefield and check that the name is the same as your
datastore column name (no quotes, for example). (Of course,
ll_row must be > 0) HTH KL

> Hi,
>
> I'm new to using the rich text edit control in PB and I am
> trying to merge data with a rich text datawindow into an
> RTF file and display it in the RichTextControl.
>
> In the rtf file I have created a merge tag as such:
> {SECTION1} and I have the same column defined in my
> datawindow {SECTION1}
>
> My code is as follows:
> _______________________________________
> DataStore ds_rtf_data
> long ll_Row
>
> dw_1.SetTransObject(SQLCA)
> dw_1.Retrieve(1, 10357)
>
> ds_rtf_data = CREATE DataStore
> ds_rtf_data.DataObject = "d_abc"
> ds_rtf_data.SetTransObject(SQLCA)
> ll_Row = ds_rtf_data.Retrieve()
>
> rte_1.InsertDocument ( "c:\Test_RTF_File.rtf", TRUE )
> rte_1.DataSource ( ds_rtf_data )
> _______________________________________
>
> Why doesn't this work? I've check the return codes and
> they are all successful. My file is not set to read only.
>
> Does anybody have a sample code that performs this merge
> functionality?
>
> Thanks so much advance,
> Patricia
>
> ---== Posted via the PFCGuide Web Newsreader ==---
> http://www.pfcguide.com/_newsgroups/group_list.asp


Patricia C Posted on 2009-07-22 13:19:27.0Z
From: "Patricia C" <patricia@flee.com>
Newsgroups: sybase.public.powerbuilder.rte
Organization: 164.44.75.3
References: <4a64e97e@forums-3-dub.sybase.com> <4a65d4e2.79e0.1681692777@sybase.com>
X-Newsreader: AspNNTP 1.50 (JodoHost)
Subject: Re: rte_1.DataSource ( ds_rtf_data ) NOT Working
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4a6711df$3@forums-3-dub.sybase.com>
Date: 22 Jul 2009 06:19:27 -0700
X-Trace: forums-3-dub.sybase.com 1248268767 10.22.241.152 (22 Jul 2009 06:19:27 -0700)
X-Original-Trace: 22 Jul 2009 06:19:27 -0700, vip152.sybase.com
Lines: 63
Path: forums-1-dub!forums-master!forums-3-dub.sybase.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.rte:283
Article PK: 791864

Hi, Thanks for this suggestion but nothing happens when I right-click the merge
field. The cursor turns into an arrow pointing upwards but nothing else.

I've been desperately trying to get this field merge to work and resorted to
stripping down the process to creating the merge field programmatically as in
sample code, and then changing the contents, but this doesnt work either.
___________________________________________________________
rte_1.InputFieldInsert("Section1")
rtn = rte_1.InputFieldChangeData("Section1", "Mary")
MessageBox( " rte_1.InputFieldChangeData", string(rtn))
___________________________________________________________

Could there be something wrong with my OCX? Am I supposed to do something with
this control in the development environment before it works?

Thanks,
Patricia

On 21 Jul 2009 07:46:59 -0700,
in sybase.public.powerbuilder.rte

<KL> wrote:
>Open your doc (in the RTE control), right-click on the
>mergefield and check that the name is the same as your
>datastore column name (no quotes, for example). (Of course,
>ll_row must be > 0) HTH KL
>> Hi,
>>
>> I'm new to using the rich text edit control in PB and I am
>> trying to merge data with a rich text datawindow into an
>> RTF file and display it in the RichTextControl.
>>
>> In the rtf file I have created a merge tag as such:
>> {SECTION1} and I have the same column defined in my
>> datawindow {SECTION1}
>>
>> My code is as follows:
>> _______________________________________
>> DataStore ds_rtf_data
>> long ll_Row
>>
>> dw_1.SetTransObject(SQLCA)
>> dw_1.Retrieve(1, 10357)
>>
>> ds_rtf_data = CREATE DataStore
>> ds_rtf_data.DataObject = "d_abc"
>> ds_rtf_data.SetTransObject(SQLCA)
>> ll_Row = ds_rtf_data.Retrieve()
>>
>> rte_1.InsertDocument ( "c:\Test_RTF_File.rtf", TRUE )
>> rte_1.DataSource ( ds_rtf_data )
>> _______________________________________
>>
>> Why doesn't this work? I've check the return codes and
>> they are all successful. My file is not set to read only.
>>
>> Does anybody have a sample code that performs this merge
>> functionality?
>>
>> Thanks so much advance,
>> Patricia
>>
>> ---== Posted via the PFCGuide Web Newsreader ==---
>> http://www.pfcguide.com/_newsgroups/group_list.asp