Place the u_cst_querybuilder control on your window or user object. You'll need to pass a reference to your window to querybuilder using the of_SetParentWindow method.
Display a list of tables for the user to select at any time by calling the of_AddTable() method. A window will display with a list of tables that can be added to the query. If the same table is chosen more than once, it will be alias'ed in your query with a unique name.
You can toogle querybuilder to be in "Join" mode by calling the of_ToggleAutoJoin method. This will allow users to physically join two tables by clicking on a column in one table, then clicking on another column in another table. Alternatively, the user can hold the SHIFT key will clicking to create physical joins between tables.
DRAG ICON (Important)
Some of the tabs in the querybuilder control use a custom icon for the drag icon (pbus_drag.ico). It's used in the SELECT, GROUP BY and ORDER BY tabs. You must distribute this icon with your application or build it into your application with a PBR file.
Open Event of your Window:
//Set parent window
Call the following whenever you're ready to connect your querybuilder control to your database:
//Tell querybuilder you're connecting to SQL Server
//Display the table popup so users can start adding tables to their query
Copyright © 2021 Werysoft Inc.