|
Dynamic DataWindows allow you to create and modify DataWindows on the fly.
To create a DataWindow dynamically, use the dwCreate function.
dwCreate takes two arguments: the name of the DataWindow that will be replaced by the new DataWindow, and the syntax for creating the new DataWindow. You can create the DataWindow syntax programmatically, but it is easier to:
Use the dwSyntaxFromSQL function to generate the syntax from a SELECT statement
Create prototype syntax and then use the prototype syntax in dwCreate
To create prototype syntax:
- Create a DataWindow using the DataWindow Painter.
- Export the source of the DataWindow using the Export feature in the Library Painter.
- Change the syntax of the source in a text editor. For example, you might want to change the columns or the format, add a DataWindow object, or change the groups.
- Save it.
|