This section should only be read by database administrators who are setting up window configurations for their users.
Window templates are files that contain window setup information captured by the window_template_export script.
Window templates are used automatically by NewViews whenever needed. There is no corresponding window template import script.
Window template files are kept in the window templates folder: c:/nv/nv2.dat/window_templates where c:/nv is assumed to be the NewViews installation folder. Window template files have the extension .nv2_window_template. They have special file names and whenever NewViews creates a new window, NewViews searches the window templates folder for the template corresponding to the class of the window being configured. If NewViews cannot find a template for a window class, then a basic default configuration is used.
When you run the window_template_export script, NewViews will export a set of window template files. You can export them to any folder and also copy them around later. Two reasonable destination folders are the window template folder .../nv2.dat/window_templates described above, and a folder with the same name, i.e. window_templates in the same folder containing the workstation database. When looking for a window template, NewViews checks the window_templates folder in the current workstation folder before checking the default window template folder, i.e. c:/nv/nv2.dat/window_templates. So you can override the templates independently for different workstations.
You might also use a separate folder in order to distribute your setups to other users in a multi-user environment. Suppose you set up windows in such a way that they are especially convenient for a number of your users. You export the window templates to a folder on the network that all users can access. A user can then copy the templates into their window templates folder, i.e. to c:/nv/nv2.dat/window_templates, or into their workstation folders, and from that moment on their newly created windows will be configured in the same way.
We indicated that newly created windows will use the window templates but you can also force their use by issuing the Tools>Default Setup command. This re-creates the window and its sub-windows, and the window templates are during the re-creation.
You set up preferred window positions, sizes and columns, etc. The state of your windows will be captured in the exported templates, and used automatically whenever windows are created. This ability can be used to ease configuration and provide consistency among users.
Issue the File>SaveAll command.
To ensure that the exported information accurately reflects what you just set up, save the workstation data.
Issue the Tools>Script Evaluate command and select the script.
The scripts is c:/nv/nv2.dat/script/window_template_export.qw_script. It should appear by default in the list when you click <List> but if you don't see it, click <Browse> to pick it from a file explorer.
Select the target folder.
When exporting a window template you pick a folder and number of pre-named files are created in that folder.
A good export folder is window_templates in the same folder that contains the workstation. By default, NewViews looks for window templates in the window_templates sub-folder of the workstation folder first; then in c:/nv/nv2.dat/workstation_templates.
An exported template file is a flat text file that can be viewed but it is not recommended that you edit it. The window template files are given the file extension .nv2_window_template.
The real work behind the export scripts is preparation. To prepare, you navigate through your application database setting up windows the way you want them. When you are satisfied perform the export. Here are some techniques, pointers, and guidelines.
Configure the ledgers of various account classes.
Position on the root account in a tree explorer (left pane). Position the right pane on the setup view. Click on the line number title. This should result in 11 lines in the right pane, one per account class counting the total and root account classes. Split the right pane, positioning the bottom pane on the ledger. Click on each account in the top pane and configure it's ledger in the bottom pane.
How you configure your windows is entirely up to you. That's really the main point of this exercise. What some people do is click on the date column title to put the ledger in reverse date order (later dates toward the top). Then you might position on the first ledger item. Repeat for each account class in the top pane.
Set up your reports.
Visit your reports and set up the columns and the header dates and analysis resolution etc. This makes life a bit easier for users who import the template.
Set pane sizes appropriately.
Maximize windows where desired and when splitting panes adjust the divider to useful ratios. If you are really picky you can even adjust the dividers to land perfectly on line boundaries so lines are not partially displayed.
Issue the File>Save All command before running the script.
This ensures your window setups are saved and that the saved versions will be used during the export.