Beruflich Dokumente
Kultur Dokumente
TABLE OF
CONTENTS FOR
THIS MANUAL
10
Customizing ReportSmith
Chapter 10
You can customize the ReportSmith environment to suit your needs using
the Options dialog box. Specify whether to load data locally to the client
memory or disk, keep it on the server, or let ReportSmith determine the best
method for your report. Additionally, you can specify units options, tell
ReportSmith where to find datasource connections, and more. This chapter
shows you how to set ReportSmiths options, customize ReportSmiths menu
and toolbar, and run a report from an icon.
Setting options
To customize ReportSmith options:
163
Program Start-up
Units
List Fields
Alphabetically
Connection File
Description
Client Memory
Click this option if you always want the data loaded into client (meaning your local
machines) memory.
Client Disk
Click this option if you always want the data loaded onto disk. Specify the data path
for the disk in the RPTSMITH.INI file
164
Users Guide
Option
Description
On server
Click this option and ReportSmith leaves all the records on the server except the
number of records specified in the Buffer option
Automatic
Click this option to have ReportSmith evaluate where to place the data. Automatic is
the default option. Youll see the following settings when you click this option:
Minimize Report Data Memory Usage Evaluates available disk space and keeps the
data on the server if there isnt enough room on the disk.
Limit Report Data Usage to Percentage of Memory Limits memory usage to 50% by
default. ReportSmith estimates the memory requirements for data storage. If the data
requires more than 50% of the available memory, ReportSmith looks at the available
disk space. If the disk space is insufficient, the data stays on the server. You can
increase or decrease this setting by entering the percentage you want to use.
Limit Report Data Memory Usage to Kilobytes ReportSmith estimates memory
requirements for data storage using the number of kilobytes (KB) you enter for this
option instead of a percentage limit. Enter the number of KB in the text box for this
option.
Buffer Records Controls the size of the buffer when ReportSmith accesses data left on
a server.
Description
Open Report
Click this option and ReportSmith automatically displays the Open Report
dialog box when the application opens.
New Report
Click this option and ReportSmith automatically displays the Create A New
Report dialog box for you to choose a table and create a new report.
None
Selecting measurements
Use the Units option to set the default measurement system to inches or
centimeters.
Option
Description
Inches
Cm
Granularity
Update Units
During File Open
If your report was created with different units options than specified in
the Options dialog box, choose this option to have ReportSmith convert
your report to use the options you specify. (See Granularity, above, for
further information.)
Chapter 10, Customizing ReportSmith
165
Description
Screen
Click this option to select screen fonts each time you use ReportSmith.
(When you choose this option, ReportSmith includes TrueType fonts.)
Printer
Click this option to select only fonts that are installed on your printer
each time you use ReportSmith.
Click this option to select both screen and printer fonts each time you
use ReportSmith. (When you choose this option, ReportSmith includes
TrueType fonts.)
True Type
Click this option to use TrueType fonts (scalable fonts that you can
change and that appear exactly as theyll print) each time you use
ReportSmith.
Storing connections
The Connection File option stores the connections you create through File|
Connections. This option sets the location and name of your connection file.
The default Connection file name is RPTSMITH.CON. ReportSmith stores
this file in your Windows directory. If your Windows working directory is
on a local area network (LAN), give the connection file for each workstation a
unique file name, with a three-character .CON file extension. To change this
option, place the text cursor in the text box to enter the drive, directory, and
file name for the connection file.
166
Users Guide
Function
AddMenu
EnableMenu
EnableIcon
Enables and disables icons and combo boxes on the toolbar and ribbon.
IsMenuChecked
IsMenuEnabled
KillMenu
In the following exercises, well show you how to write a macro that disables
the New command and the New Report button. Then, well show you how
to add your own menu item that automatically loads a report that you use
often.
Disabling File|New
Suppose you dont want a user to be able to create a new report (you only
want the user to be able to open existing reports). You can disable the File|
New command and the New Report button on the toolbar. Well show you
how to disable these options in the following example. In it, well create a
global macro, CUSTOM_MENU that is linked to the Application Startup.
Each time you start ReportSmith, it runs the CUSTOM_MENU macro,
disabling the New command and toolbar button.
To disable the New command and the New Report button:
5 Enter the following formula into the Macro Formula text box:
Sub custom_menu()
EnableMenu "File|New",0
EnableIcon 1,1,0
End Sub
167
7 Press the Links button to open the Macro Links dialog box.
8 Under Object Type, choose Report. Under Event, choose Before Report
Open and choose Link. ReportSmith displays 1 of 1 in the Link Number
text box, indicating that you have created one link and you have a total of
one link. Press OK.
168
Users Guide
Notice that ReportSmith has placed the first and last lines of your formula
into the text window for you.
5 Enter the following formula into the Macro Formula text box:
Sub bring_up_report()
AddMenu "My Report","load_mac","File|New","This loads my report"
End Sub
169
6 Press OK and your icon appears. You can double-click on it whenever you
want to run your report. When you select the icon it runs the ReportSmith
program, so you should select the icon when ReportSmith is not running.
170
Users Guide