July 23, 2014
Hot Topics:
RSS RSS feed Download our iPhone app

Sybase Pocket Builder: Working with DataWindow

  • March 28, 2006
  • By Alex Gusev
  • Send Email »
  • More Articles »

What is DataWindow?

Many software packages today offer various ways to retrieve and display data from whatever source. In many cases, easy access to data is achieved by a less attractive presentation layer and vice versa. Sybase PocketBuilder gives you a balanced solution that combines the best practices from both approaches. A DataWindow object incorporates business intelligence and different user presentations, so you may show the same data in a number of different ways. By using PocketBuilder's DataWindow Painter, you can create sophisticated data presentation layouts that will suit your needs in most cases.

DataWindow technology is implemented in two parts:

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

If you don't need any visual interface, you can use a DataStore object to manupulate the data. Either way, DataWindow objects allow you to define a data source, track data changes, apply specific valudation rules, and so forth. Presentation styles include tabular, freeform, grid, group, and graph. You also have handy various filtering, sorting, and grouping options. The next sections provide more detail on those topics.

Creating a DataWindow Object

Now, you can create your sample DataWindow object. That's an easy process. To start with, select File > New > DataWindow tab. The very next step is to choose a presentation style. As noted above, there are five different styles supported in Sybase PocketBuilder:

  • tabular
  • grid
  • freeform
  • group
  • graph

Freeform Style

This style is used to edit a single row or in data entry forms. You can reorganize default layouts, moving columns and text so your form will look as you want. This type of presentation style is often used to show Details of a selected row in the table.

Tabular and Grid Styles

These two styles are similar, and they both allow you to display the data in the way of a table; in other words, multiple rows at a time. The tabular style has headings at the top of the page and data columns under the headings. The grid style looks pretty much the same as a standard spreadsheet. It also allows you to resize columns and rows and reorder columns at runtime without any additional code.

Group Style

This representation style extends the Tabular one by providing a possibility to group data according to a given column. The DataWindow then enables you to define a calculation rule to display data correctly.

Graph Style

According to its name, the Graph style represents the data in many graphical ways (17 different graph types in the current version). You can select All rows to be presented, or only a specified Page. You set up axes where needed, data sets, and so forth. A nice visual representation of your data will be a good compensation for your effort.

Data Sources

You will build your sample based on a Grid-style representation. Thus, after you create a new target, add a DataWindow object and place DataWindow control on main form, you can select a Data Source for it. To avoid dealing with a database at this moment, I select an External Data Source:

A Wizard will request to define fields, their types, and lengths:

Following the Wizard, finally you will see something like this:



Click here for a larger image.





Page 1 of 2



Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Sitemap | Contact Us

Rocket Fuel