Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

DataSource – PB Docs 126 – PowerBuilder Library

DataSource – PB Docs 126

DataSource PowerScript function

Description

Allows a RichTextEdit control to share data with a DataWindow
and display the data in its input fields. If there are input fields
in the RichTextEdit control that match the names of columns in the
DataWindow, the data in the DataWindow is assigned to those input
fields. The document in the RichTextEdit control is repeated so
that there is an instance of the document for each row in the DataWindow.

Controls

RichTextEdit controls

Syntax

Argument

Description

rtename

The name of the RichTextEdit control
for which you want to get data in a DataWindow

dwsource

The name of the DataWindow control, DataStore,
or child DataWindow that contains the data to be connected with
input fields in rtename

Return Values

Integer. Returns 1 if it succeeds and
-1 if an error occurs.

Usage

When names of input fields match names of columns in the DataWindow object,
the data in the columns is assigned to the matching input fields.

The document in the RichTextEdit control is associated with
one row in the DataWindow. There is an instance of the document
for each retrieved row. The text in the RichTextEdit control is
repeated, with all its formatting, in every document instance. The
content of the input fields changes as the data in each row changes.
Except for the contents of the input fields, the contents of each instance
is the same—you cannot make changes to the surrounding
text that affect individual instances only.

If the InputFieldNamesVisible property of the RichTextEdit
control is true, the fields will show their names
instead of the data they contain. Change the property value to false to
see the data. The following RichTextEdit functions operate on or
report information about an instance of the document:

  • LineCount

  • PageCount

  • InsertDocument

  • SaveDocument

  • SelectedPage

  • SelectedStart

  • SelectedLine

  • SelectText

  • SelectTextAll

The following RichTextEdit function affects the collection
of documents:

  • Print

Examples

This example establishes the DataWindow control dw_1 as
the data source for the RichTextEdit rte_1:

This example inserts a document called LETTER.RTF into
the RichTextEdit rte_letter (the names
of the document’s input fields match the columns in a DataWindow
object d_emp), creates a DataStore,
associates it with d_emp, and retrieves
data. Then it inserts the document in rte_letter and
sets up the DataStore as the data source for rte_1:

See Also


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x