| Hyderabad Jobs | Book Website | ![]() |
I Love Hyderabad | Hyderabad Colleges |
| Home | Business Emails | Hyderabad Classifieds | Contact Us | |
| 7 Wonders of Hyderabad | Web Hosting | Yellow Pages | Our Network | |
Advanced PowerBuilder
On Fly DataWindow CreationPowerBuilder allows you to create a DataWindow dynamically at execution time by using Create() function. For example, say you display a list of columns to the user and let him pick the ones he want to see in the report. In such a case, at painting time, you will not know anything about the appearance of the finished DataWindow. When having a DataWindow or the custom user object control on your window, you need to complete the three steps involved in the dynamic creation of a DataWindow, in your script:
You can then set the transaction object and retrieve the data as normal. The reason we call SyntaxFromSQL() is, that the syntax for a DataWindow is different from the SELECT statement; it also contains the column attributes such as font details, colors and so on, as well as other attributes such as band details. A sample of a DataWindow's syntax is shown below:
As an example, the following script creates a grid style DataWindow and retrieves data from product_master:
SyntaxFromSQL() takes three parameters: a SELECT statement, a style and a string variable to populate any error information. The style attribute is the most complex parameter. The syntax is as follows:
Tabular DataWindow style is the default, and to assume the default values, simply specify an empty string as the parameter. Note that this method does not support the Composite presentation style. Again, the simplest way to create this syntax is to use DW Syntax with the Create option and paste the results directly into the code.
|
| Copyright © 1996 - 2006 HamaraShehar.com Pvt. Ltd. All Rights Reserved.
Domain Registration, Website Design, Website Hosting by HamaraShehar.com |