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

About DataWindow objects, controls, and components – PB Docs 100 – PowerBuilder Library

About DataWindow objects, controls, and components – PB Docs 100

About DataWindow objects, controls, and components

DataWindow technology is implemented in two parts:

  • A DataWindow object The DataWindow object defines the data source and presentation
    style for the data.
  • A DataWindow control or component The control or component is a container for the DataWindow
    object in the application. You write code that calls methods of
    the container to manipulate the DataWindow object.

DataWindow controls and components

The DataWindow was originally invented for use in PowerBuilder
to provide powerful data retrieval, manipulation, and update capabilities
for client/server applications. Now the DataWindow is available
in several environments:

  • PowerBuilder
    DataWindow
    A PowerBuilder control for use in client/server and
    distributed PowerBuilder applications.
  • Web DataWindow A thin-client DataWindow implementation for Web applications
    that provides most of the data manipulation, presentation, and scripting
    capabilities of the PowerBuilder DataWindow, requiring the Web DataWindow
    component on a component server but no PowerBuilder DLLs on the
    client. The Web DataWindow can be implemented in three ways:

    • XML Web DataWindow Separate XML (content), XSLT (layout), and CSS (style) with
      a subsequent transformation to XHTML
    • XHTML Web DataWindow XHTML
    • HTML Web DataWindow HTML
  • Web DataWindow DTC A design-time control used to represent the Web DataWindow
    on a development machine. The DTC is an ActiveX control that generates
    a set of instructions for the DataWindow component on a component
    server. The component generates a Web DataWindow for display in
    a client browser. The client browser does not need to support ActiveX
    controls to display the Web DataWindow.
  • Sybase DataWindow Web control for ActiveX An ActiveX control for use on Web pages. The client browser
    must support ActiveX controls to display a DataWindow object used
    by this control.
  • DataWindow plug-in A browser plug-in that displays Powersoft reports.

For a comparison of each of these environments, see “Choosing a DataWindow technology”.

You can also use DataStore objects as containers for a DataWindow
object. DataStores provide DataWindow functionality for retrieving
and manipulating data without the on-screen display. Uses for DataStores
include specifying layouts for printing and managing data in the
server component of a distributed application.

What DataWindow objects are

A DataWindow object is an object that you use to retrieve,
present, and manipulate data from a relational database or other
data source (such as an Excel worksheet or dBASE file). You can
specify whether the DataWindow object supports updating of data.

DataWindow objects have knowledge about the data they are
retrieving. You can specify display formats, presentation styles,
and other data properties to make the data meaningful to users.

In the DataWindow painter, you can also make Powersoft report
(PSR) files, which you can use in DataWindow controls or components.
A PSR file contains a report definition—essentially a nonupdatable
DataWindow object—as well as the data contained in the
report when the PSR file was created. It does not retrieve data.

Where to define DataWindow objects

You define DataWindow objects in the PowerBuilder DataWindow
painter. You
can also define nonupdatable DataWindow objects in the InfoMaker Report
painter.

Presentation styles and data sources

When you define a DataWindow object, you choose a presentation
style and a data source.

Presentation styles

A presentation style defines a typical style of report and
handles how rows are grouped on the page. You can customize the
way the data is displayed in each presentation style. The presentation
styles include:

Table 1-1: DataWindow presentation styles
Presentation
style
Description
Tabular Data columns across the page and headers
above each column. Several rows are viewable at once.
Freeform Data columns going down the page with
labels next to each column. One row displayed at a time.
Grid Row-and-column format like a spreadsheet
with grid lines. Users can move borders and columns.
Label Several labels per page with one row
for each label. Used for mailing and other labels.
N-Up Two or more rows of data next to each
other across the page. Useful for periodic data, such as data for
each day of the week or each month in the quarter.
Group A tabular style with rows grouped under
headings. Each group can have summary fields with computed statistics.
Composite Several DataWindow objects grouped into
a single presentation. Not supported by the Web DataWindow.
Graph Graphical presentation of data. Not supported
by the Web DataWindow.
Crosstab Data summary in a row-and-column format.
RichText Paragraphs of text with embedded data
columns. Not supported by the Web DataWindow or the Sybase DataWindow
Web control for ActiveX.
OLE An OLE object linked or embedded in the
DataWindow and associated with the retrieved data. Not supported
by Web DataWindow.

For examples of the presentation styles, see the PowerBuilder
User’s Guide

.

Data sources

The data source specifies
where the data in the DataWindow comes from and what data items
are displayed. Data can come from tables in a database, or you can
import data from a file or specify the data in code. For databases,
the data specification is saved in a SQL statement.
In all cases, the DataWindow object saves the names of the data
items to display, as well as their data types.

Table 1-2: Data sources you can use for a DataWindow
Data source Description
Quick Select The data is coming from one or more tables
in a SQL database. The tables
must be related through a foreign key. You need to choose only columns,
selection criteria, and sorting.
SQL Select You want more control over the select
statement that is generated for the data source. You can specify
grouping, computed columns, and so on.
Query The data has already been selected and
the SQL statement is saved in
a query object that you have defined in the Query painter. When
you define the DataWindow object, the query object is incorporated
into the DataWindow and does not need to be present when you run
the application.
Stored Procedure The data is defined in a database stored
procedure.
External The data is not stored in a database,
but is imported from a file (such as a tab-separated or dBASE file)
or populated from code.

Basic process

Using a DataWindow involves two main steps:

  1. Use the DataWindow painter to create or edit a DataWindow
    object.
    In the painter, you define the data source, presentation style,
    and all other properties of the object, such as display formats,
    validation rules, sorting and filtering criteria, and graphs.
  2. In your development environment, put a DataWindow
    control in a window, visual user object, or form or a DataWindow
    container in a Web page and associate a DataWindow object with the
    control or container.
    It is through the control or container that your application
    communicates with the DataWindow object you created in the DataWindow
    painter. You write code to manipulate the DataWindow control or
    container and the DataWindow object it contains. Typically, your
    code retrieves and updates data, changes the appearance of the data,
    handles errors, and shares data between DataWindow controls.

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