Friday, June 22, 2007

From the Edge: Customizing Data Browser/Editor
Section: Enhanced Commands
Chapter: Running R:BASE Your Way!
Platform: R:BASE 7.6 and Turbo V-8 for Windows
Builds: R:BASE 7.6 (7.6.1.30622 or higher ...)
        R:BASE 7.6 (C/S:I) for Windows (Build: 7.6.1.30622 or higher)
        R:BASE V-8 Turbo (8.0.15.30601 or higher ...)

Using the latest updates of R:BASE 7.6, R:BASE 7.6 (C/S:I) and Turbo
V-8 for Windows, you may customize the Data Browser/Editor Window
using the following OPTIONs:

Syntax:

EDIT colname .. FROM tableviewname WHERE .. ORDER BY .. OPTION
BROWSE colname .. FROM tableviewname WHERE .. ORDER BY .. OPTION

OPTION parameters:

. WINDOW_STATE value
             values: MAXIMIZED, NORMAL, MINIMIZED (Default: NORMAL)
. CAPTION value
. LOCK nnn
. ROWVIEW
. READONLY ON/OFF (Default: OFF)
. MODAL ON/OFF (Default: ON)
. PRINTDATA ON/OFF (Default: ON)
. EXPORTRESULT ON/OFF (Default: ON)
. SAVERESULT ON/OFF (Default: ON)

Where:

WINDOW_STATE provides the ability to MAXIMIZE, NORMALize,or  MINIMIZE
the displayed Data Browser/Editor Window. The default is NORMAL.

CAPTION provides the customized caption for displayed Data Browser/Editor
Window.

LOCK  locks the number of column(s) in Data Browser/Editor Window.

ROWVIEW  opens Data Browser/Editor Window in "View as Row" mode.

READONLY  opens Data Browser/Editor Window in Read-Only mode.
(Default is OFF)

MODAL opens Data Browser/Editor Window as Modal/Non-Modal Window.
(Default is ON = Modal)

PRINTDATA enables/disables "Print Data" menu item.
(Default is ON)

EXPORTRESULT enables/disables "Export Results to ->" menu item.
(Default is ON)

SAVERESULT enables/disables "Save Data As ->" menu item.
(Default is ON)

-- Example 01:
CONNECT RRBYW14
BROWSE ALL FROM Customer ORDER BY Company +
OPTION WINDOW_STATE MAXIMIZED

will start Data Browse/Editor as maximized window.

-- Example 02:
BROWSE ALL FROM Customer ORDER BY Company +
OPTION WINDOW_STATE NORMAL

will start Data Browser/Editor as normal window (default).

-- Example 03:
BROWSE ALL FROM Customer ORDER BY Company +
OPTION WINDOW_STATE MINIMIZED

will start Data Browser/Editor as minimized window.

-- Example 04:
BROWSE ALL FROM Customer ORDER BY Company +
OPTION WINDOW_STATE MAXIMIZED +
|CAPTION Customer Data

will start Data Browser/Editor as maximized window with the caption
"Customer Data".

-- Example 05:
BROWSE ALL FROM Customer ORDER BY Company +
OPTION WINDOW_STATE MAXIMIZED +
|CAPTION Customer Data +
|LOCK 2

will start Data Browser/Editor as maximized window with the caption
"Customer Data" and lock the first two columns (CustID and Company).

-- Example 06:
BROWSE ALL FROM Customer ORDER BY Company +
OPTION WINDOW_STATE NORMAL +
|CAPTION Customer Data +
|ROWVIEW

will start Data Browser/Editor as normal window with the caption
"Customer Data" as "View As Row" mode.

-- Example 07:
EDIT ALL FROM Customer ORDER BY Company +
OPTION WINDOW_STATE NORMAL +
|CAPTION Customer Data +
|READONLY ON

will start Data Browser/Editor as normal window with the caption
"Customer Data" and the Read Only mode. Pressing [F4] key will not
have any effect when this options is used. You will not be able to
change the data.

-- Example 08:
EDIT ALL FROM Customer WHERE CustState = 'CA' +
ORDER BY Company +
OPTION WINDOW_STATE NORMAL +
|CAPTION Customer Data for California +
|MODAL OFF
EDIT ALL FROM Customer WHERE CustState = 'PA' +
ORDER BY Company +
OPTION WINDOW_STATE NORMAL +
|CAPTION Customer Data for Pennsylvania +
|MODAL OFF

will start two Data Browser/Editor windows as normal, one with the
caption Customer Data for California and the other with caption
Data for Pennsylvania. Both windows will be displayed as non-modal
windows that can be switched back and forth.

-- Example 09:
EDIT ALL FROM Customer ORDER BY Company +
OPTION WINDOW_STATE NORMAL +
|CAPTION Customers +
|PRINTDATA OFF

will start Data Browser/Editor as normal window with the caption
"Customers" and the disabled option for Print Data.

-- Example 10:
EDIT ALL FROM Customer ORDER BY Company +
OPTION WINDOW_STATE NORMAL +
|CAPTION Customers +
|EXPORTDATA OFF

will start Data Browser/Editor as normal window with the caption
"Customers" and the disabled option for Export Results to.

-- Example 11:
EDIT ALL FROM Customer ORDER BY Company +
OPTION WINDOW_STATE NORMAL +
|CAPTION Customers +
|SAVERESULT OFF

will start Data Browser/Editor as normal window with the caption
"Customers" and the disabled option for Save Results to.

-- Example 12:
EDIT ALL FROM Customer ORDER BY Company +
OPTION WINDOW_STATE NORMAL +
|CAPTION Customers +
|PRINTDATA OFF +
|EXPORTDATA OFF +
|SAVERESULT OFF

will start Data Browser/Editor as normal window with the caption
"Customers" and the disabled option for Print Data, Export Result
to and Save Results As.

A PDF version of this article is also available at:

From The Edge: http://www.razzak.com/fte/

Very Best R:egards,

Razzak.

Reply via email to