Documente Academic
Documente Profesional
Documente Cultură
shoc SCM
Reproduction in whole or in part in any form is prohibited without written consent of the copyright owner.
The publication of information in this document does not imply freedom from patent or other protective rights of shoc R.Haenggi Inc or others. All brand names in this document are trademarks or registered trademarks of their owners.
Contents
Introduction 1
Overview .......................................................................................................................1 Legal Claims .................................................................................................................1 Before turning on...........................................................................................................2 General: ...........................................................................................................2 CD ....................................................................................................................2 Safety copies ...................................................................................................2 Registration ......................................................................................................2 System Requirements...................................................................................................3 Software Versions .........................................................................................................3 Internet ..........................................................................................................................3
Installation
10
SAT C Monitoring........................................................................................................10 General ..........................................................................................................10 Data Flow .......................................................................................................10 SAT C Input....................................................................................................11 SAT C View....................................................................................................12 Sat C Config...................................................................................................13
Menus
15
File Menu ....................................................................................................................15 Edit Menu ....................................................................................................................16 View Menu ..................................................................................................................17 Favorites Menu ...........................................................................................................17 Tools Menu .................................................................................................................18 The User List..................................................................................................18 User Rights ....................................................................................................19 The Login Screen .......................................................................................20 The Database Tools.......................................................................................20 Audit Trail .......................................................................................................20 The Error Tracking .........................................................................................21 The System Locks .........................................................................................21 Print Screen ...................................................................................................21 Window Menu .............................................................................................................21 Help Menu...................................................................................................................22 Contents.........................................................................................................22 Support...........................................................................................................22 About..............................................................................................................23
Standard Objects
25
Contents iii
Standard Office-Like Toolbar ......................................................................................25 Standard Data Form ...................................................................................................25 Table ..............................................................................................................27 Sort.................................................................................................................27 Incremental Search........................................................................................27 One To Many Form........................................................................................28 Query/Filtering.............................................................................................................28 Auto Report .................................................................................................................35 Report Manager ..........................................................................................................37
Reports
38
Modify a generated report or label ..............................................................................38 Planning Data Placement ...........................................................................................40 Resizing Bands ..............................................................................................41 Report Controls Toolbar..............................................................................................41 Adding Report Controls...............................................................................................42 Adding Controls with Quick Report................................................................43 Setting Report Data Sources .........................................................................44 Adding Field Controls.....................................................................................45 Adding Label Controls....................................................................................46 Adding a General Field ..................................................................................46 Copying and Deleting Report Controls ..........................................................48 Aligning Controls............................................................................................49 Adjusting Control Placement..........................................................................49 Grouping Data on Your Layout ...................................................................................50 Adding a Single Group...................................................................................51 Adding Multiple Data Groupings ....................................................................51 Changing a Group Band ................................................................................52 Deleting a Group Band ..................................................................................53 Changing the Grouping Order........................................................................53 Customizing Your Layout............................................................................................53 Defining the Report Page...............................................................................54 Formatting Field Controls...............................................................................56 Adding Lines, Rectangles, and Circles ..........................................................57 Adding a Picture.............................................................................................59 Changing Control Colors................................................................................60 Adding a Comment to a Control.....................................................................61 Controlling Data Sources ............................................................................................61 Protecting a Report's Data Session ...............................................................61 Refining Page Layout.....................................................................................62 Using Expressions and Functions in Field Controls ......................................63 Defining Report Variables ..............................................................................65 Formatting Field Controls...............................................................................67 Setting Print Options for Groups ....................................................................73 Collecting User Input with Queries ................................................................75 Previewing and Printing Your Report..........................................................................77 Previewing Your Results................................................................................77
Drivers
79
Computer ....................................................................................................................79 DCOM ............................................................................................................79 RS-232 Hardware (W4100DSP / W4050DSP) ..............................................80 RS-232 Software (W4100DSP / W4050DSP) ..............................................81 IR Ports ..........................................................................................................82 Decoder.......................................................................................................................82 WAVECOM 4100DSP....................................................................................82 WAVECOM 4050DSP....................................................................................82 WAVECOM 41PC ..........................................................................................82 WAVECOM 51PC ..........................................................................................83
iv Contents
Product Information
83
Directory structure on disk ..........................................................................................83 Database/Tables .........................................................................................................83 General ..........................................................................................................83 SAT C tables ..................................................................................................84 Addresses ...................................................................................................................85 Manufacturing and world-wide sales .............................................................85 In case of problems.....................................................................................................85
87 89
Contents v
Introduction
Overview
shoc Sat C Monitoring Is a program that puts together all the info that you receive on one (WAVECOM SAT C Monitor) or multiple (shoc SAT C Monitor) SAT C channels. It will: bring the text in correct order does an automatic selection between ASCII and Baudot display of the data
Legal Claims
Warning All information's given in this manual, the software or databases are only for personal informative use. Communications equipment may only be used as allowed by the local law. Anyone divulging the content of any non-broadcasting transmission can be in violation with the local law. Disclosure prohibitions exist in most countries of the world. shoc is not liable if you use information's from this program, manual or database. 1989-2003 by shoc, R.Haenggi Anyone copying this manual, software or databases will be prosecuted. The copyrights to this manual, software, databases belong solely to shoc, R. Haenggi. By legally acquiring the software (or by downloading from the internet), the licensee is granted the right to use the aforementioned products, but shoc, R.Haenggi retains the title and ownership of these products. Copying, multiplication, sale, translation, and other uses of this product partially or in its entirety are prohibited. Copying of the CDs may only be done as a safety measure. Limited guarantee No liability is held for the validity of the content's of this manual. In spite of all efforts' errors may never be completely avoided, and we are grateful for any corrections notified to us. The manual, software and databases
Introduction 1
were produced with the greatest care. No liability may be held against the supplier for any damages arising from the use of this product. Modifications This program is undergoing continuous development and thus differences may occur between the program and the manual. Trade marks "FoxPro", Visual FoxPro, "WINDOWS" are registered trade marks of Microsoft Corp. WAVECOM is a registered trade mark of WAVECOM Nachrichtentechnik AG, Blach, Switzerland. Additional products mentioned in the user's manual may be copyrighted by their manufacturers. Author shoc, R.Haenggi Gfell CH-8499 Sternenberg Switzerland Tel. +41-52- 394 12 55 Tel. +41-79- 421 50 37 Fax +41-52- 394 12 56 e-mail: support@shoc.ch Internet: http://www.shoc.ch
Before turning on
General:
This documentation assumes that you have closely studied the manual of your PC, receiver/transceiver and decoder and that you are already familiar with it. You must be familiar with the WINDOWS operating system. In this help file, information that may be extracted from the manuals of your operating system, your PC or other programs will not be repeated. In case you have not yet gathered sufficient experience in using your PC then you should obtain additional introductory literature.
CD
Only during installation should the original CD be used. Always use the original CD for installation! If you download the software from Internet, make a safe backup of the file.
Safety copies
Do safety backup of your data files at regular intervals.
Registration
To become a registered "shoc Sat C Monitoring" owner and thus gain the right to technical support and advice you must return your registration form.
2 Introduction
System Requirements
Pentium 200 MHz Processor (Pentium 3, 800 MHz recommended) Mouse >64 MB of RAM (128 Mbytes recommended) One COM-Port for the decoder (under WINDOWS correctly installed) Microsoft WINDOWS 95/98/ME/NT/2000 (W2000 recommended) SVGA 600X800 or higher resolution monitor Hard disk space for specific installation about 10 Mbytes (without databases).
Software Versions
The software is available in two different versions: shoc SAT C MON WAVECOM SAT C MON.
The WAVECOM version is a light version that can work with only one card. Item
Number of cards Reports Report Editor Favorites
WAVECOM
1 1 N/A N/A
shoc
Unlimited Unlimited Yes Yes
Internet
http//www.shoc.ch On our www page you find the newest information regarding shoc shoc RSM Hot-Frequencies
Introduction 3
Installation
Procedure
The installation program is running under WINDOWS. Existing files will be overwritten. Save your files if you need them again! Locate the Setup.exe on your CD or the file downloaded from the internet. Start the the Setup.exe. The files will be unpacked in a temporary directory and the installation starts with the InstallShield Wizard.
4 Installation
Select the directory where "Sat C Monitoring" has to be installed (The installation program makes you a proposal). Press Next to continue.
Installation 5
Now, you are ready to install. Check your settings an press Install if everything is correct. The installation will start copying files to your hard disk.
After installation has been completed you see the confirmation screen that the installation was successful.
6 Installation
Configuration
The control of the WAVECO decoder cards relies on DCOM. Depending on your system setup (Domain controller, server configuration etc.) the operating system will check if you are entitled to use the DCOM objects. Please note that DCOM is not included in a standard Windows 95 setup. If you have no server checking the authentication then you can set the required rights with dcomcnfg.exe. Set the Authentication level of the W41Server to None and the default impersonation level of to Impersonate. After changing the values you have first to reboot your machine.
Installation 7
DCOM Configuration
If "dcomcnfg.exe", is not available on your computer (as it is not on all WINDOWS CD's), you have to download it from the following address: http://www.microsoft.com/com/dcom/dcom95/download.asp http://www.microsoft.com/com/dcom/dcom98/download.asp
On some Windows 95/98 computers the configuration with "dcomcnfg.exe" is not possible. If this is the case, then download an update or try the version from the CD.
Program Start
Double click on the SAT C Monitoring label in the Windows Start Menu. Depending on your software version you will see a registration form. Enter the Name, Company and Password that you received with the program or get one from shoc. Please note that no Demos are available for this product. You can get a new license from shoc
8 Installation
Registration Form
Now you see the Login Screen. As a default value you can use Username ADMIN or "ADMINISTRA" without Password.
Login Screen
Now you are in the SAT C Monitor application. In a next step you have to make the driver configuration before you can process the data coming from the decoder(s).
Installation 9
SAT C Monitoring
General
As we do produce two different versions of the program, maybe not all items of this manual will be covered by your program version. As during normal monitoring the received data are about 5-10 Mbytes/day the limit of 2 GBytes can be reached very quick. (with one channel after 200day to 400 days. With 4 channels after 50-100 days.) If you need to store this large amount information, please contact shoc. We are able to use SQL-Server as the front end or store the data in separate files. The function to read in the data and to analyze, search or print the data are split up into two screens.
Data Flow
In the configuration SETTINGS you control which decoder is used to capture a satellite channel. In the temporary table (SAT_CH) the data are processed. When a message is complete, the message is transferred to the SAT_C data table. The SAT_C data table can be viewed, printed or the records can be exported to another table.
W41PC#1
W41PC#2
W41PC#n
Decoder
SET1
SET2
SETn
Settings
Temporary Table
sat_ch
sat_ch2
Data Table
Filter
Kriteria
Export
Report
Display
Output
SAT C Input
This screen is used to gather the data. Please note, that the single channel version supports just one decoder card. It will use the first active record that was setup on the configuration screen. The data are displayed on the screen only for control.
As soon as the decoder is initialized, the received data will be appended to the database. Sometimes you have to wait for a while until the beginning of a new message is received. In the upper part you see the setting that is processed at this moment. If you are monitoring multiple channels the record with the yellow bar is cuurently monitored. The marked record will change periodically. In the middle part you see the records that are already inserted into the database and in the lower part you can see the decoded data. In a first step, the data are displayed as they have been received from the decoder. If the program detects that no further information have to be added to a record, then the data in the hex filed are analyzed. After choosing between the correct decoding mode, the record is marked with : Message Type "A" for ASCII Message Type "B" for BAUDOT
After doing the translation to Baudot or ASCII the records are moved to the SATC table.
SAT C View
In a multi channel environment all the records are transferred into a big database that hold the records from all the different satellite channels. This makes it much easier to analyze the data. In the TXT field the data are replaced with the transformed HEX field.
The display of the messages can be switched between TXT (ASCII) or HEX mode. On the screen you find the following additional controls: ASCII. Convert the current record from HEX to ASCII. Can be used to correct the TXT, if the software selected the wrong Message Type.
BAUDOT. Convert the current record from HEX to BAUDOT. Can be used to correct the TXT, if the software selected the wrong Message Type. Delete All. You will be asked, if you like to delete all the records. Def. Font. Switch back to the default font. This enables you to have more text on the screen after, when you maximize the window. Export. This function is not available in the single channel version. You can Export the data to another Visual FoxPro table. In the Remarks field you can enter a short comment. This will be displayed if enter a record to the favorites menu.
Sat C Config
On the Setup Screen you set the parameters the program needs to be able to select the hardware (Decoders or Receivers).
If activated, this setting is used to gather data. Use a short, unique and meaningful name to
Dec. Driver
Select the decoder you use with this setting. Please note, that the driver "DECODER" is a default driver that has no functionality behind it. It is only for testing.
Dec. Computer Give the name of the computer where your decoder is located. If it is on the local computer, then enter no value.
for example: computerA
Dec. Address For equipment connected to the RS232: Select the address of your decoder (if available). For the W41 PC set the card address ( from 1 to 8).
Please note that your computer will hang for a longer time, if it can not find the required computer.
List Display All the currently programmed settings for different equipment combinations are displayed.
Menus
File Menu
Using the standard File Open approach, the complexity of the menus is reduced. The user see a common File Open Dialog. Less common functions or user specific functions can be included in this menu. The program has a user-specific Recently Used File List where the last four selections appear and are only one click away from being selected again. Page Setup, Preview and Print are the normal Windows specific functions used to print a document. The File Exit command reflects the Office Compatible Standard. Exit ends your RadioSpectrumManager session and returns you to the WINDOWS desktop. All files are closed. You can also exit with ALT+F4.
Menus 15
Edit Menu
The Edit Menu has all Data Manipulation Functions for the currently selected record as well as the possibility to call the Find and Other Function forms. Depending on the mode of the current form which can be either in Edit/Insert mode or View Mode
some menu options might be disabled. For detailed information regarding the functions for this, please refer to the chapter Data Manipulation Form later in this document. Undo Undo reverses the last action that you performed on any text within a field, record or file, and in text editing regions in dialogues. If you choose Undo repeatedly, actions will be reversed all the way back to the start of the current editing session. Save Write back edited data from the temporary buffer to the record. Cut Remove selection and put it on the clipboard Cut removes selected text from any field record or from text editing regions in dialogues. The text is placed on the clipboard. you can also use Cut to remove an OLE object and place it in the clipboard. Use Cut when you want to remove a selection from one location and place it in a different location using Paste. For more information on cutting text, refer to the Text Editor section. Copy
16 Menus
Copy selection and put it on the clipboard Copy duplicates the selection (without removing it) and places the copy on the clipboard. For more information on copying text, refer to the Text Editor section. Paste Place contents of the clipboard at the insertion point. Paste inserts a copy of the clipboard contents into the current file or field at the cursor location. If the text is selected and you choose Paste from the Edit menu, the contents of the clipboard replace the selected text. Find Search in the table Copy Record feature The feature is available in the edit menu as seen above named Copy Record. Also in the main toolbar, a new command button has been inserted just next to the New button:
View Menu
Here you can customize your Toolbar (when available) as well as toggle the pages in a multi tab page dialog or simply navigate through the current set of records in a data manipulation form.
Favorites Menu
Menus 17
This is the programs Favorites menu. The first option is to add the currently selected record to the favorite menu. The second is to manage the favorites. At the bottom all currently available favorites grouped by form are displayed as additional menu options at runtime. Please note that this is not supported by all program versions.
Tools Menu
18 Menus
Users can clear their resource file, if they want to start over with new settings, or if they are switching from a larger display resolution to a smaller, or simply if they arent satisfied anymore with their user preferences for forms, grids, sort orders and pick lists. To clear the resource file click on the command button called Clear Resource.
User Rights
We implemented a very useful security enhancement where you can define in a simple form which can only be opened by the administrators of your applications (user level 1): The form looks like this:
The idea is simple, if you look at the form you might guess it already: Based on the level the user has, he can perform the View, Insert, Edit or Delete action on the form. In the above example, the user level must be 1 to be able to view the parent table, 2 to view, insert edit and delete the Child table and 3 to view, insert, edit and delete the Item table.
Menus 19
Login Screen
In this dialog, you see in the list region titled Tables all available tables which make up the application. In a user-friendly Dialog, you can select the tables you want to process. You can select from the following options: Pack Pack Memo Reindex
Select OK to run the desired database maintenance action for the selected tables of your application.
Audit Trail
Optional Audit Trail Feature for data manipulation tracking on the current record.
20 Menus
The administrator can clear this list by selecting the command button called Delete All.
Print Screen
Automatic Print screen feature using WinWord in the background for printing.
Window Menu
If you have multiple windows open, you will see their form captions in the Windows menu.
Menus 21
Help Menu
Contents
The program provides help so that you can access information about any system window, dialogue or menu options while you are using it. Press the F1 key. Help appears. To close the Help window at any time, press Alt+F4. If you prefer, you can scroll through the topics list in the Help window and find help for a specific topic.
Support
Screen with support info.
22 Menus
About
Select the about dialog under the menu option Help About. You find info about your actual version.
Menus 23
Standard Objects
Cut Text (CTRL+X) Copy Text (CTRL+C) Paste Text (CTRL+V) Undo Changes (CTRL+Z) Call Online Help (F1) More Functions (F6)
Standard Objects 25
Speedbar control
Switch from edit to list mode by either clicking on these tabs or by using the keyboard shortcut CTRL+PGUP/ CTRL+PGDN as described in the menu option view.
If you are in edit or insert mode, the caption of the form changes and the toolbar controls are synchronized automatically:
NOTE: For input of massive data, you can directly call CTRL+N while already in insert mode. This allows incomparable fast data input for multiple records. For the same handling optimization reason, the table navigation keys are available also while in edit or insert mode.
26 Standard Objects
Table
Start typing in any column, which has the incremental search capability enabled and incremental search automatically sorts and finds the first match. Also doubleclicking on any column header automatically sorts by a column. Doubleclicking again alternates the sort. Its like in the Win95 Explorer user interface with the only difference, that single clicking selects the column for drag operation.
Sort
Sort on any column by double-clicking on the desired column. Alternate the sort by double-clicking again. You see the current sort order in the grid column header. The color specifies the sort order for the column. A yellow background indicates an ascending; a red background, a descending sort.
Incremental Search
The incremental search is a nice feature. Just click on the header of your field you are searching on and then start typing. Sample: User enters
13 13.10 13.10.99
Standard Objects 27
The handling of the parent is identically to the described handling in the standard data manipulation form.
In this example, there are two child grids to the above parent.
While in edit or insert mode, these command buttons will be available to insert or delete records from the selected child grid. Alternatively use CTRL+INS resp. CTRL+DEL.
This example shows a OneToMany Form with the Navigation buttons on the form
Operations on the Master The operations on the master are identical to the standard data manipulation form. The form button bar and Edit Menu applies to the master. Operations on the Child Only if you are in edit or insert mode of the master, you can directly write into the child grid, insert new child records or delete the currently selected child record. All operations on the child records are handled using the optimistic table buffering. If you select undo changes, the changes made to all child records of the current master record are rejected. If you select save changes, all changes applied to the master and to all child records of the current master will be saved.
Query/Filtering
When you view records in a form or print a report, you frequently dont want every available record displayed or printed. Selecting a subset of records to work with is called filtering. A filter is made up of one or more conditions. A single condition compares a field to a value. For example, Frequency is greater than 14500 is a condition that only allows those records with a frequency of more than 14500 kHz to be part of the subset. Operators
28 Standard Objects
How a field is compared to the value is called the operator. There are several operators available; they are shown in the table below. Some operators use more than one value; for example, is between requires two values (as in Date is between 01/10/96 and 12/31/96). Other operators dont use any value; for example, Active is either true or not without needing a value. Operator
Equals
Description
The data stored in the field must exactly match the value you specify. Example: Station equals BBC The resulting sub-set will be records that only have BBC as station name. Records with BBC1, BBC2, and BBC3 will not be included.
The data stored in the field may be anything but the value you specify. Example: Mode does not equal FSK The data in the field will start with the value specified. Example: Station begins with BBC The resulting sub-set will be records that have BBC, BBC1, BBC2, and BBC3 as the last name. This operator only appears for character and memo fields.
begins with
contains
The field has the specified value anywhere in the data it contains. Example: Station contains Amazon You will get all records with Amazon somewhere in the station field. This operator only appears for character and memo fields.
The field does not have the specified value anywhere in the data it contains. Example: station does not contain Amazon This operator only appears for character and memo fields.
is blank
Includes all records where the specific field is empty. Example: Mode is blank Includes records where the specific field contains data. Example: Mode is not blank The field contains a value in excess of the specified value. Example: frequency is greater than 100 Example: station is greater than M
is not blank
is greater than
Standard Objects 29
Operator
is greater than or equal
Description
The field contains a value in excess of or equal to the specified value. Example: frequency is greater than or equal to 100 Example: station is greater than or equal to M
is less than
The field contains a value under the specified value. Example: frequency is less than 100 Example: station is less than M
The field contains a value under or equal to the specified value. Example: frequency less than or equal to 100 Example: station is less than or equal to M
is Yes
The field contains Yes. Example: ATT is Yes This operator only appears for logical fields.
is No
The field contains No. Example: ATT is No This operator only appears for logical fields.
is between
This operator allows the entry of a range of values. Example: frequency is between 150 and 250 Example: DATE is between 05/01/94 and 12/31/94
is one of
This operator allows for entry of up to ten different values for a single field. The equivalent expression would be created using ten separate equals operations. Example: ITU is one of SUI, USA, PHL, AUS
Conditions are connected together with a connector. The connector can be either and or or. The and connector means that the two conditions it connects must both be true for a record to be included in the subset, while the or connector means that either one or both can be true for a record to be included in the subset. The Filter Dialog The filter dialog is displayed below. This dialog allows you to select which fields to filter on, select which comparison operators to use, and enter the comparison values. You may create a filter for a one-time situation or you may create and save it for future use. The filter dialog has buttons that provide functions such as adding conditions, deleting conditions, etc. You can also choose these functions by right-clicking on the dialog and choosing the appropriate function from the menu (called a context menu) that appears.
30 Standard Objects
Adding a Condition To add a new condition to the filter, select the Add button. You can also press the Insert key or choose Add Condition from the context menu. If you dont have any conditions in your filter yet, the Filter Condition dialog shown below will appear.
If you already have at least one condition in your filter, the Filter Condition dialog appears a little differently, as shown below.
Standard Objects 31
The Connection combo box, which doesnt appear if this is the first condition for your filter, is used to define how this condition is connected to the previous condition in your filter. The default connection is and, but you can also choose or or one of various combinations of and or or with parentheses to allow you to group your conditions and specify the order the conditions are evaluated. The system will automatically balance parentheses, so there is no need to worry about a starting or ending parenthesis. The Field combo box shows all fields you can filter on from the primary table and any tables related to it (the related table name is shown as a disabled bar above its fields). After selecting a field, you select a comparison operator from the Operator combo box. The options that appear in this combo box will depend on the type of field selected. For example, for logical fields, the only choices that appear are Yes and No. Once youve selected an operator, you may enter a value to compare to the field. You will not be allowed to enter a value if you choose the is blank, is not blank, is Yes, or is No operators. If you chose the is between operator, you must enter two values. If you chose the is one of operator, you can enter up to ten different values (you must enter at least two). The OK button is disabled until you enter a value. If you arent sure what values appear in the field or want to select a value without having to type it, choose the Value button. A list of unique value from the field will appear in a dialog box. You can choose a single value or multiple values; to select more than one value, hold down the Shift key as you click on the desired value. If you choose more than one value, the operator will automatically be changed to is one of.
32 Standard Objects
If youve selected a character or memo field, the Case Sensitive checkbox is enabled. If Case Sensitive is checked, only those records with the value in the same case (that is, upper and lower case characters) as you typed it will match. If it isnt checked, case doesnt matter; for example, entering Jones would match Jones, JONES, JoNeS, or any other combination of case. After you have completed entering the condition, press the OK button to save the condition and add it to the list. Choose Cancel to cancel the new condition. Editing a Condition To edit a condition, select it in the list and choose the Edit button, or press Enter or double-click on the condition. You can also choose Edit Condition from the context menu. The Filter Condition dialog will appear, and you may change any of the items that make up the condition. Click on the OK button to save any changes you made to the condition, or Cancel to cancel any changes. Deleting a Condition To delete a condition, select it in the list and choose the Delete button. You can also press the Delete key or choose Delete Condition from the context menu. The list will be adjusted as necessary. Rearranging Conditions A button with up and down arrows appears at the left edge of each condition in the list. You can click on this button and drag the selected condition up or down in the list. This is usually only important if you use parentheses to group conditions and wish to rearrange the grouping.
Standard Objects 33
Counting Matching Records The Count button displays the number of records matching your filter. You can also right-click and choose Count Records from the context menu. Clearing the Filter The Clear button deletes all conditions in the filter. You can also choose Clear Filter from the context menu. Saving, Retrieving and Deleting Filters Because filters can be complicated, you can save and retrieve commonly used filters. A saved filter can also be used as the basis for a new, slightly different filter. If you retrieve a stored filter and make changes to it (perhaps adding a new condition or changing an existing condition), you may re-save it with the same or a different name. Choosing the More >> button expands the filter dialog as shown below. Choosing this button again (which then appears as Less <<) restores the dialog to its former appearance.
The Store button is enabled when you have at least one condition defined for your filter. When you choose this button, or choose Store Filter from the context menu, a dialog will appear which allows you to enter a name for your filter. You might want to include your own name in the filter name so others can tell whose filter it is. A name like Rons Filter - Jan/94 might be appropriate. You can also enter a more complete description of the filter if you wish. Type in the name and description and select the OK button. The name of the filter will appear below the Store button.
34 Standard Objects
To retrieve a filter, press the Retrieve button or choose Retrieve Filter from the context menu. A list of stored filters will be presented. Select the one you wish to retrieve and press the OK button to load the saved filter. The name of the filter will appear below the Store button and the filter conditions will display in the list.
To delete a saved filter, press the Remove button. A list of saved filters is presented from which you can select the one to delete. Press OK to delete the selected filter.
Auto Report
Ever had the wish to be able to create reports to printout the information displayed in the grid ? With shoc his become true. And its really easy too. When you select the preview button in the form toolbar, you will receive the following:
Standard Objects 35
If you select YES, you will go to the Auto Report, if you select NO, you will go to the Report Manager.
On page one, named options, you can define two lines for a title of the report, in the Print options you can define Preview or Print (preselected depending on how this form has been called), the format (portrait or landscape), whether you want to have page numbers, whether the page number should be suppressed on the first page and whether you want to have a date and time printed on the report header.
36 Standard Objects
On page 2, named Advanced, you can select which fields you want to include in your report. By default all fields are selected. Note that the order of the fields corresponds exactly to the grid layout!
Report Manager
The report Manger enable you to use or modify existing reports. You can also produce new reports, if you have the required knowledge. Look at the special report chapter in this manual if you plan to write new reports. It is also a good idea to buy some VFP books from Microsoft or other publishers.
The following functions are available: Select the Report type Here all relevant report types for the currently active form are presented. Available Reports for selected Report type Here you see all available reports. On top, you see the report templates, which can only be managed by the system administrator ("Report Templates"). Next, you see the reports of the currently logged on user ("Own Reports") which can only be modified by the user himself or by the administrator. Finally, the other user's reports are presented ("Other User's Reports") which are only visible for the administrator. In the Edit box below the list, a meaningful description can be edited and will be displayed when the corresponding report has been selected in the above list. Print Prints the selected report if the checkbox "To ASCII" has not been selected. If the checkbox "To ASCII" has been selected, the report will be exported into an ASCII file.
Standard Objects 37
Preview Previews the selected report if the checkbox "To ASCII" has not been selected. If the checkbox "To ASCII" has been selected, the report will be exported into an ASCII file. Cancel Quits this form with no action. Modify Calls the "modify report" command. The report environment will be prepared. Copy Copies the selected report and flags it for the current user which can modify it as needed. Delete Deletes the currently selected report. Copy to other users Allows to copy the selected report to one or multiple users in order to allow them to work with this report as if it where a personalized report they created. To ASCII The report will be exported as an ASCII file. Template Defines whether this report is a template or not. This is an administrator option. Export a report into a to be specified directory. Import one or more reports from a to be specified directory.
Reports
38 Reports
Choose Modify. You use the bands of the report to determine what each page, group, and the beginning and end of your report looks like. Report bands can be resized. In the report bands, you add report controls, then move, copy, resize, align, and adjust them to arrange the text and fields in your report.
The flowing other functions are available: Select the Report Type Here all relevant report types for the currently active form are presented. Available Reports for selected Report Type Here you see all available reports. On top, you see the report templates, which can only be managed by the system administrator ("Report Templates"). Next, you see the reports of the currently logged on user ("Own Reports") which can only be modified by the user himself or by the administrator. Finally, the other user's reports are presented ("Other User's Reports") which are only visible for the administrator. In the Edit box below the list, a meaningful description can be edited and will be displayed when the corresponding report has been selected in the above list. Print Prints the selected report if the checkbox "To ASCII" has not been selected. If the checkbox "To ASCII" has been selected, the report will be exported into an ASCII file. Preview Previews the selected report if the checkbox "To ASCII" has not been selected. If the checkbox "To ASCII" has been selected, the report will be exported into an ASCII file. Cancel Quits this form with no action. Modify Calls the "modify report" command. The report environment will be prepared. Copy Copies the selected report and flags it for the current user which can modify it as needed.
Reports 39
Delete
Copy to other users Allows to copy the selected report to one or multiple users in order to allow them to work with this report as if it where a personalized report they created. To ASCII The report will be exported as an ASCII file. Template Defines whether this report is a template or not. This is an administrator option. Export Import directory. Exports a report into a to be specified directory. Imports one or more reports from a to be specified
A report can also have multiple group bands or bands for a column header and footer. You can add these bands using the procedures in Defining the Report Page and Grouping Data on Your Layout later in this chapter. You can use the table below to determine which bands you want to use.
To print
Once per report
Page header
40 Reports
Column header
Choose Page Setup from the File menu and set Column Number greater than 1. Choose Data Grouping from the Report menu. Available by default. Choose Data Grouping from the Report menu. Choose Page Setup from the File menu and set Column Number greater than 1. Available by default. Choose Title/Summary from the Report menu.
Group header
Column footer
You can place any of the report controls in any of the bands. You can also add user-defined functions that are processed when the report is run. For more information about user-defined functions in reports and labels, see Chapter Adding Queries and Reports
Resizing Bands
You can modify the size and characteristics of each band. To resize a band Drag the bands bar to the appropriate height. Use the ruler to the left as a guide. The rulers measurement is specific to the height of the band and does not include the page margins.
Tip You cannot make a band shorter than the height of the controls in the layout. Move the controls within the band first, and then reduce the height.
Button
Description
Reports 41
Select Objects Resizes and moves controls. After you create a control, the Select Objects button is automatically reselected, unless the Button Lock button is pressed down. Label Creates a label control, used for text that you don't want the user to change, such as a caption above check boxes or under a graphic. Creates a field control, used to display the contents of a table's field, memory variable, or other expression. Use to draw a variety of line styles on your report at design time. Use to draw rectangles on your report.
Field
Line
Rectangle
Rounded Rectangle
Use to draw rectangles with rounded corners and ellipse shapes on your report.
Picture/OLE Use to display a picture or contents of a general Bound Control data field on your report. Button Lock Allows you to add multiple controls of the same type without having to click the control button on the toolbar more than once.
Picture/OLE Bound
After placing the controls, you can change their format, size, color, position, and print options. You can also add a comment to each control for your reference only; it does not actually print in the report.
42 Reports
Select the field layout, title, and alias options you want. If you want to select fields for the report, choose Fields and complete the Field Picker dialog box.
Reports 43
Choose OK.
You can save, preview, and run the report as it is. Note Quick Reports do not add general fields to the report layout.
The data environment manages your reports data sources by: Opening the tables or views when the report is opened or run. Populating the data set your report needs based on associated tables and views. Closing the tables when the report is closed or released.
44 Reports
To add a table or view to the data environment From the View menu, choose Data Environment. From the Data Environment menu, choose Add. In the Add Table or View dialog box, select a database in the Database box. In the Select area, choose Tables or Views.
Your selection determines which fields list appears in the Tables in database box.
You can set the order your records appear in your report by setting an index for the data environment. To set an index for the data environment From the View menu, choose Data Environment. From the shortcut menu, choose Properties. In the Properties Window, choose Cursor1 in the Object box. Choose the Data tab and select the Order property. Enter an index name. -orSelect an index from the list of available indexes.
Reports 45
From the Report Controls toolbar, insert a Field control. In the Report Expression dialog box, choose the dialog button after the Expression box. In the Fields box, double-click the name of the field you want. The table name and field name appear in the Expression for Field on Report box.
Note If the Fields box is empty, add a table or view to the data environment. You do not have to keep the table name alias in the expression. You can delete it or you can clear the Expression Builder options. Choose OK.
From the Report Controls toolbar, choose the Label button. In the Report Designer, click to place the control. Type the characters for the label.
You can edit as you would in a text editor: use the ENTER key to adds lines or the Edit menu to cut, copy, and paste text. To edit a label control
In the Report Designer, choose the Label button, and then click the label you want to edit. Type the changes. After placing the text, you can change its font and colors. For more information, see the sections Changing Fonts and Changing Control Colors in this chapter.
46 Reports
In the Field box, type a field name. -orChoose the dialog button to select a field or variable. Choose OK.
The placeholder for the General field appears in the frame you defined. By default, the picture retains its original size. Selecting, Moving, and Resizing Report Controls If you created a report layout that already has controls on it, you can change their placement and size on the report. You can change each control individually or you can select a group of them and treat them as one unit. To move a control Select the control and drag it to a new position in a report band.
The control moves by increments into position within the layout. The increments are based on the grid settings. To override the grid, press the CTRL key while you drag the control. To select multiple controls Drag to draw a selection box around the controls.
Selection handles appear around each control. While they are selected, you can move, copy, or delete them as a group.
Reports 47
You can associate a group of controls together for more than just the current task by identifying them as a group. For example, you might want to associate a label control and a field control with each other so you can move them without selecting them separately. This feature is also useful after you have formatted and aligned the controls because it preserves their positions with respect to one another. To group controls together Select the controls you want to treat as a group. From the Format menu, choose Group.
The selection handles move to the outside of the entire group. You can treat the group of controls as a single unit. To ungroup a group of controls Select the group of controls. From the Format menu, choose Ungroup.
The selection handles appear around each of the controls that were in the group. Once a control is on your layout, you can change its size individually or you can resize a group of controls to match each other. You can resize any report control except labels; their size is determined by the text, font, and point size. To resize a control Select the control, then drag one of the selection handles to the desired size.
To match the size of multiple controls Select the controls you want to have the same size. From the Format menu, choose Size. Choose the appropriate option to match the width, height, or size.
A copy of the controls appears below the original set. Drag the copy into position on the layout.
48 Reports
From the Edit menu, choose Cut or press the DELETE key.
Aligning Controls
You can align controls in relationship to each other or you can place them according to the grid provided by the Report Designer. You can align the controls with a particular side or with the center. To align controls with each other Select the controls you want to align. From the Format menu, choose Align. From the submenu, choose the appropriate alignment option. Visual FoxPro uses the control whose edge is the closest to the direction you selected to align as the anchor.
You can also use the Layout toolbar. Using the toolbar, you can align with the control farthest from the side you select by holding the CTRL key down while clicking the alignment button.
Align the controls with an edge that all of the selected controls have open and away from each other. Controls that are in a row and are selected to align with their right side, or left side, will pile on top of each other. Likewise, controls that are in a vertical line and selected to align with their top, bottom, will overlap. For more information about the toolbars, search for a specific toolbar name in Help. To center controls within a band Select the controls you want to align. From the Format menu, choose Align. From the submenu, choose Center Vertically or Center Horizontally.
The controls move to the vertical or horizontal center of their respective band.
Reports 49
To place a control at a specific position From the View menu, choose Show Position. Select the control, then move the control into place using the position information on the status bar.
To align controls manually From the Format menu, clear Snap to Grid. To display grid lines From the View menu, choose Grid Lines.
A grid appears in the report bands. To change the measurements of the grid From the Format menu, choose Set Grid Scale. In the Set Grid Scale dialog box, enter the number of pixels for the horizontal width and vertical height of each square in the grid.
If the data source is a table, the records are probably not in the appropriate order for grouping. You can sort and order the data appropriately by setting an index on the table, using an ordered view in the data environment, or using a query as the data source to display the records in groups. The report layout does not actually sort and order your data but processes the records in the same order that they exist in the data source. Sorting and ordering must be done with a view, index, or other form of data manipulation outside the layout. For example, if a group breaks at the Region field, each time the report processes a different region value, it produces a group. It does not recognize that a country at the beginning of the table should be sorted to group with the same country at the end of the table.
50 Reports
In the first Group box, type the group expression. -orChoose the dialog button to create an expression in the Expression Builder. In the Group properties area, select the properties you want. Choose OK.
After adding the expression, you can place any controls you want in the bands. Usually, the Field control used for grouping is moved from the Detail band to the Group Header band.
Reports 51
region should be the second. In this multiple group report, the table must be sorted or indexed on a key expression such as Region+City. To add multiple groups From the Report menu, choose Data Grouping.
In the first Group box, type the group expression. -orChoose the dialog button to create an expression in the Expression Builder. In the Group properties area, choose the properties you want. Choose Insert and repeat steps 2 and 3 for each grouping expression. Choose OK.
Groups are numbered in the Data Grouping list in the order they are created. In the Report Designer, the names of the group bands contain the number of the group and a truncated group expression. The group headers and footers with the lowest number appear closest to the Detail band.
52 Reports
Choose the dialog button to change the expression in the Expression Builder. Change the grouping options as necessary.
The group band is removed from the layout. If the group band contains controls, you are prompted to delete the controls as well.
Reports 53
You can change the data environment, page setup, or report controls. The data environment defines the source for the data to include in the report, the page setup defines the overall look of the report page and report bands, and the report controls define items that appear on the page.
54 Reports
To set the margin, enter a number for the margin in the Left margin box.
The page image changes to display the new margin. To select a paper size, choose Print Setup. In the Print Setup dialog box, select a paper size from the Size list. To select paper orientation, choose an orientation in the Orientation area, and then choose OK. In the Page Setup dialog box, choose OK.
Defining the Page Header and Footer The controls placed in the Page Header or Page Footer bands appear once on each page of the report. A report that has many pages should include the report name, page number, date, and labels (if appropriate) in a header or footer. Defining the Detail Band Typically, the controls placed in the Detail band print once for each record. Adding Title and Summary Bands The Title band holds information that prints once at the beginning of the report and the Summary band holds information that prints once at the end of the report. Both the title and the summary can be on their own page. Fields with totaling expressions become grand totals when placed in the Summary band. To add a title or summary band From the Report menu, choose Title/Summary.
Reports 55
Select the bands you want. If you want the band to appear on its own page, select New Page. Choose OK.
The Editing area displays the formatting options available for that data type. Note This data type applies only to the report control. It reflects the data type of the expression and does not change the data type of the field in the table. Select the justification and format options you want. The Format dialog box displays different options depending on the data type you choose. Justifying Text in a Field You can justify field contents within the control in two ways. This setting does not change the position of the control on the report, only the contents within the space of the control. To justify text in a field control Select the controls you want to change. From the Format menu, choose Text Alignment. From the submenu, choose the appropriate command.
56 Reports
In the Report Expression dialog box, choose the dialog button after the Format box.
In the Format dialog box, select the data type for the field: Character, Numeric, or Date. Select the justification and format options you want.
Changing Fonts You can change the font and size of text for each field or label control or you can change the default font for the report. To change fonts and size in a report Select the control. From the Format menu, select Font. The Font dialog box appears. Select the appropriate font and point size, and then choose OK.
To change the default font From the Report menu, choose Default Font. In the Font dialog box, select the appropriate font and point size you want as the default, and then choose OK.
Only the controls inserted after you changed the default font will reflect the new font settings.
Reports 57
To draw a line
From the Report Controls toolbar, choose the Line button. In the Report Designer, drag to size the line.
After drawing the line, you can move or resize it, or change its thickness and color. For more information, see the section Changing Line Thickness or Style later in this chapter. Drawing Rectangles You can draw rectangles on your layout to visually organize the information that prints on the page. You can use them as borders around report controls, report bands, or the entire page. To draw a rectangle
From the Report Controls toolbar, choose the Rectangle button. In the Report Designer, drag to size the rectangle.
Drawing Rounded Rectangles and Circles You can draw circles or rectangles with a variety of rounded corners. To draw a rectangle or circle
From the Report Controls toolbar, choose the Rounded Rectangle button. In the Report Designer, drag to size the control. Double-click the control.
58 Reports
In the Style area, select the corner style you want. If appropriate, set position options. Choose OK.
Adding a Picture
You can insert a picture as part of the report. For example, a company logo can appear in the page header of an invoice. Pictures from a file are static; they do not change with each record or group of records. If you want to change the display depending on the record, insert a General field instead. To add a picture
From the Report Controls toolbar, choose the Picture/OLE Bound Control button.
Reports 59
In the Picture from area, select File. In the File box, type a file location. -orChoose the dialog button to select a graphic file. If appropriate, set the size, position, or print options. Choose OK.
To change colors Select the controls to change. In the Color Palette toolbar, choose Foreground Color or Background Color.
60 Reports
Add
Conditions in the Filter tab WHERE or HAVING clause
Reports 61
In the Columns area, enter the number of columns for the page. This is the same as the number of records you want to print across the page. In the Width box, enter a value for column width. In the Spacing box, enter a value for the space you want to appear between each column. Choose OK.
Tip If you're printing groups set to start on a new page, don't use the Print Order option. The Report Designer reflects your changes. If your layout already contained report controls in the Detail band, you may need to move or resize them to fit within the boundaries of the new column. Setting Report Band Height While designing your report, you can change the height of a report band. The height of a report band determines the amount of space that each report band uses on the page within the page margins. For example, if the Title band is set at a half inch, the Title will appear in the first half inch of space after the top margin. The detail band shows the amount of
62 Reports
space devoted to each printed record. The following information applies to all of the report bands. You can set additional parameters for Group Header and Footer bands. To set a precise band height Double-click the bar for the appropriate band. A dialog box for the band appears. In the Height box, enter a value for the height. Choose OK.
To add table fields from the toolbar From the Report Controls toolbar, insert a Field control. In the Report Expression dialog box, choose the dialog button after the Expression box. In the Fields box, double-click the name of the field you want.
Note: The table name and field name appear in the Expression for Field on Report box. If the Fields box is empty, add a table or view to the data environment. You don't have to keep the table name alias in the expression. You can delete it or you can clear the Expression Builder options. Choose OK.
In the Report Expression dialog box, choose OK. After entering the expression, you can change the format or set printing, position, or stretch options. Inserting Concatenated Field Controls After you add your table fields, you might notice that they don't print the way you would like on the page. For example, printing the field controls for City, Region, and Postal Code separately produces unwanted spaces between each value. You can trim or concatenate the table fields into one
Reports 63
field expression. The space required by each value for this control will vary. You can set the control to adjust for each value. To combine several table fields into an expression From the Report Controls toolbar, insert a Field control.
Tip Size the field to the least amount of room the expression will require. If more space is needed, you can set the control to stretch for larger values, but you cant set it to shrink if less space is needed. In the Report Expression dialog box, select the dialog button after the Expression box. In the Expression Builder, select ALLTRIM(expC) from the String box. The string function appears in the Expression box with expC selected. Double-click the first field name you want to appear in the control. The field name replaces the expC. Type a plus sign after the field name or select + from the String functions box. Type , or select Text from the String functions list and then enter a comma. Repeat for additional fields to complete the expression and then choose OK. In the Report Expression dialog box, select Stretch with Overflow.
When the control is populated, the space allocated to the control adjusts downward to accommodate the value of the expression. For more information about Stretch with Overflow, see Printing Controls with Variable-Length Values in this manual. To combine several fields in an expression, place an ALLTRIM( ) function before each field name, place punctuation inside quotation marks, and place a plus sign between each of the elements in the expression. If the field value lengths don't vary, such as with postal codes or abbreviations, you can insert just the field name, as in this example: ALLTRIM(station)+", "+itu+", "+mode
Notice the spaces in quotes, rather than a comma, to separate the station region and the mode. Trimming and Concatenating Character Expressions To quickly trim and concatenate character expressions in the Expression Builder, you can place commas between character expressions. The value of the expression preceding the comma is trimmed. You can also use semicolons to place the expression on a new line, provided that the trimmed value has a length greater than zero. The following example shows character expressions for fields in a mailing address: contact_name; address; city, region, postal_code Note Use these when you don't want to include punctuation in the value.
64 Reports
If you use these methods, make sure the field is set to Stretch with Overflow. Inserting the Current Date You can insert a field control that prints the current date. To insert the current date From the Report Controls toolbar, insert a Field control. In the Report Expression dialog box, select the dialog button after the Expression box. In the Expression Builder, select DATE( ) from the Date list. Choose OK. In the Report Expression dialog box, choose OK.
Inserting a Page Number The Page Header or Footer bands usually contain a page number. If you use a wizard or Quick Report, a page number is inserted for you into the Page Footer band. To insert a page number From the Report Controls toolbar, insert a Field control. In the Report Expression dialog box, select the dialog button after the Expression box. In the Expression Builder, select _pageno from the Variables list. Choose OK. In the Report Expression dialog box, choose OK.
Tip You can use this procedure to insert any of the system variables from the Variables list into your report.
Reports 65
You can use the variable in any expression you enter in the report. To count all the Canadian entries in the table, use this expression and select Count as the calculation option. IIF(ITU="CAN",1,0) The following example shows three variables for a simple time sheet: To store this value
Time employee arrived
Using this expression hour_in + (min_in / 60) hour_out + (min_out / 60) tLeave - tArrive
TLeave
You can use the tDayTotal variable in a variety of other calculations, such as the number of hours worked in a week, a month, or a year; the average number of hours worked each day; and so on. Reordering Report Variables Report variables are evaluated in the order that they appear in the list and can affect the value of expressions that use them. For example, if variable 1 is used to define the value of variable 2, variable 1 must appear before variable 2. In the previous time sheet example, tArrive and tLeave must precede tDayTotal. To change the order of report variables From the Report menu, choose Variables. In the Variable box, drag the button to the left of the variable to rearrange the order. Choose OK.
Setting a Variables Initial Value If you use a variable in calculations, be sure that you initialize the variable with a non-zero value to avoid a division-by-zero error. If you don't specify a value, Visual FoxPro assigns a default value of 0. To set a variable's initial value From the Report menu, choose Variables. In the Variable box, select the variable you want to set. In the Initial value box, enter the value. Choose OK.
If you reorder the groups in your report, your report variables might not be resetting on the correct field. For example, if your report has two groups, the first grouping by country and the second grouping by date,
66 Reports
and you switch the order of the groups, the variables still reset according to the original positions of the groups. You can change the value of a calculation by specifying when the variable is reset. By default, Visual FoxPro resets the report variables at the end of the report. To reset a variable at the end of a report, a page, or a column From the Report menu, choose Variables. In the Reset at box, choose an option. Choose OK.
To reset a variable on entry or exit of any band In the Report Designer, open the report. Double-click the bar for the report band. In the Run expression area of the bands dialog box, choose the dialog button at the end of the On entry or On exit box.
Enter an expression to reset the variable each time the band is entered or exited.
Note: The Editing options area displays the formatting options available for that data type. This data type applies only to the report control. It reflects the data type of the expression and doesn't change the data type of the field in the table.
Reports 67
The Format dialog box displays different options depending on the data type you choose. You can also create a format template by entering characters in the Format box. Justifying Text in a Field You can justify field contents within the control in two ways. This setting does not change the position of the control on the report, only the contents within the space of the control. To justify text in a field control Select the controls you want to change. From the Format menu, choose Text Alignment. From the submenu, choose the appropriate command.
To justify text in a field Choose the Field control. In the Report Expression dialog box, choose the dialog button after the Format box.
In the Format dialog box, select the data type for the field: Character, Numeric, or Date. Select the justification and format options you want.
Defining Field Format Templates A format template allows you to customize the format of the field. By entering a combination of characters and codes in the Format box of the Report Expression dialog box or the Format dialog box, you can create a wide variety of print formats. The characters you enter appear as literal text along with the field value. The codes you enter determine the appearance of the field output.
Format Template
(999) 999-9999 @L 99:99
Printed Output
(123) 456-7890 04:55
68 Reports
Changing Fonts You can change the font and size of text for each field or label control or you can change the default font for the report. To change fonts and size in a report Select the control. From the Format menu, select Font. The Font dialog box appears. Select the appropriate font and point size and then choose OK.
To change the default font From the Report menu, choose Default Font. In the Font dialog box, select the appropriate font and point size you want as the default and then choose OK.
Only the controls inserted after you changed the default font will reflect the new font settings. To change existing objects, select them all, and then change the font using the Font option on the Format menu.
Cropping a Picture or OLE Object The picture or OLE object you inserted might not fit the frame you drew when you created the control. By default, the picture or object retains its original size. You can clip or scale it to fit into your frame. If the picture or OLE object is bigger than the frame you created in the Report Designer, only a portion of the picture or object appears in the frame. The picture or object is anchored at the top and at the left of the frame. You cannot see the lower right portion that extends beyond the frame. To fit a picture in the frame In the Report Designer, create a Picture/OLE Bound Control. In the Report Picture dialog box, select Scale picture Retain shape. The whole picture appears, filling as much of the frame as possible while retaining its relative proportions. This protects your picture from vertical or horizontal distortion.
To fill the frame with the picture In the Report Designer, create a Picture/OLE Bound Control. In the Report Picture dialog box, select Scale picture Fill the frame.
The whole picture changes to fill the frame that you sized. If necessary, the picture is stretched vertically or horizontally to fit the frame. Centering an OLE Object The OLE objects included in a General field can vary in shape and size. If the object in a General field is smaller than the frame, it appears in the upper left corner of the frame. You can center it to ensure that all objects
Reports 69
smaller than the frame are centered in the frame in the report or label. File pictures don't need to be centered because they don't vary. To center General field OLE objects In the Report Designer, create a Picture/OLE Bound Control. In the Report Picture dialog box, select Center picture. The printed OLE objects are centered within the area when the report is previewed or printed. Changing Colors of Report Controls You can change the color of a field, label, line, or rectangle. To change colors Select the controls to change. In the Color Palette toolbar, choose Foreground Color or Background Color. Select the color you want.
Setting Print Options for Controls The general layout and band position of your controls determine the time and place they are printed. You can also set specific print options for each control. Each control has a default size based either on its value (fields and labels) or the size you created (lines, rectangles, and pictures). The length of the control on the layout defines the display width of the control. Because the value of some controls will vary from record to record, you can set the height of the control to stretch downward to display the entire value. If you don't set it to stretch, the value will be truncated within the display width. You cannot resize Label controls, but you can resize all other controls. Printing Controls with Variable-Length Values If you want a control to use only the space needed by its value, you can set it to stretch. For example, the values in an expression can vary from record to record. Rather than allot a fixed amount of space on the report that accommodates the longest value, you can set the control to stretch downward to display the entire value. You can set controls below the stretching control to float down the page relative to the stretching control. Examples of controls set to stretch and float
The stretch option is available for fields, vertical lines, rectangles, and rounded rectangles.
70 Reports
For an example of controls that stretch and float, see the report Wrapping.frx in the Visual Studio \Sample\Vfp98\Solution\Reports directory. To set a field to stretch with its value Double-click the field control to display its dialog box. Select Stretch with overflow. Controls that are placed relative to controls that stretch must be set to float or they will be overwritten.
To set a control to float Double-click the control to display its dialog box. In the controls dialog box, select Float.
Caution Some of your data could be overwritten during printing if: (1) you position a field relative to the bottom of the band and include below this field another field that is positioned relative to the top of the band and can stretch; or (2) you position a field relative to the top of the band and include above this field another field that is positioned relative to the top of the band and can stretch. You can also set lines, rectangles, and rounded rectangles to stretch. They can stretch relative to the band or, if part of a group of controls, they can stretch relative to the largest control in the group. To set a line or rectangle to stretch Double-click the control to display its dialog box. In the Stretch downwards area, select an option.
To print a border around a stretchable control Draw a rectangle around the stretchable controls. Double-click the rectangle to display the Rectangle/Line dialog box. In the Stretch downwards area, select Stretch relative to the tallest object in group. Choose OK. Drag a selection box around the rectangle. From the Format menu, choose Group.
Selection handles appear at the corners of the rectangle. From now on you can treat all of the controls as one. The rectangle will stretch along with the stretchable field. Regardless of how far down the value in the field stretches, the rectangle will maintain its border around the field. You can place two of these groups side by side in the layout and one will not be affected by the stretching of the other. To print one stretchable control below another Insert the two controls one below the other in the layout. Double-click the top control to display the controls dialog box. In the Field Position area, select Fix relative to top band, and then choose OK.
Reports 71
Double-click the bottom control to display the controls dialog box. In the Field Position area, select Float, and then choose OK. The two record values will print in their entirety and will not overwrite each other.
Setting a Controls Print Options You can control when and how often each report control is printed in your report. For more information about a controls print options, see Print When Dialog Box. Suppressing Repeated Values For field controls, you can suppress values repeated for consecutive records so that the value is printed once for the first record but doesn't appear for subsequent records until the value changes. For example, if you're printing an invoice, and one of the fields contains the date of the transaction, the date would only be printed once for transactions that took place on the same date. To suppress repeated values Double-click the control to display the controls dialog box. Choose Print When to display the Print When dialog box.
In the Print Repeated Values area, select No, and then choose OK.
To repeat only on a new page or column Double-click the control. Choose Print When. In the Print repeated values area, select No. In the Also print area, select In first whole band of new page/column, and then choose OK.
72 Reports
To repeat when the detail band overflows to a new page or column Double-click the control. Choose Print When. In the Also Print area, select When detail overflows to new page/column, and then choose OK.
Building Print Expressions You can add expressions to a control: they are evaluated before the field prints. If the expression evaluates to false (.F.), the field will not print. If you add an expression, all of the other options in the Print When dialog box are disabled except Remove Line If Blank. To add a print expression Double-click the control. Choose Print When. In the Print only when expression is true box, enter an expression. -or Click the dialog button to create an expression with the Expression Builder.
The program will remove the line from the report if it evaluates to blank. If the field doesnt print or if the table field is empty, Visual FoxPro checks for other controls in the line. If none are found, the line is removed. If you don't select this option and no other controls are on the same line, a blank line is printed.
Reports 73
You might want your groups to appear in the next column for multicolumn reports, on a new page for forms, or with a new page numbered at 1. The Data Grouping dialog box offers four options to accomplish these tasks. You can: Start a group on a new column. Start each group on a new page. Reset the page number to 1 for each group. Reprint the group header on each page.
After you enter an expression, you can select these options from the Group Properties area. Preventing Orphaned Group Headers Sometimes a group may print partially on one page and then finish on the next. To avoid a group header from printing near the bottom of the page with the majority of records on the next page, you can set the minimum distance from the bottom that a group header will print. If the header would be positioned closer to the bottom of the page than the number of inches or centimeters you enter, Visual FoxPro prints the header on a new page. To prevent orphaned group headers From the Report menu, choose Data Grouping. In the Data Grouping dialog box, choose or enter a value in the Start group on new page box.
Tip To determine a good value for orphan control, add the Group Header height to one to three times the Detail height.
Printing Suppressed Values When the Group Changes If repeated values are suppressed, you may want them to print when a particular group changes. To print repeated values when the group changes Double-click the control to display the controls dialog box. Choose the Print When button to display the Print When dialog box. Select When this group changes.
The groups defined for the report appear in the box. Select a group from the box, and then choose OK. Repeating Group Headers When a group continues onto the next page, you might want the group header to repeat at the top of the group of continued information. If you have multiple data groups on your report, the header on the subsequent pages will be from the last group in the group list. Place all of the controls you want to print for the group header in the header band of the last group on the list.
74 Reports
To repeat the group header on the next page In the Data Grouping dialog box, select the group you want to repeat and then choose Reprint group header on each page.
Note: If you don't want to repeat the group header, clear this check box.
Reports 75
Report Preview
In the Print Preview toolbar, choose Previous Page or Next Page to switch pages. To change the size of the reports image, choose Zoom. To print the report, choose Print. To return to design mode, choose Close Preview.
Reports 77
Drivers
Computer
DCOM
The control of the WAVECO decoder cards relies on DCOM. Depending on your system setup (Domain controller, server configuration etc.) the operating system will check if you are entitled to use the DCOM objects. Please note that DCOM is not included in a standard Windows 95 setup. If you have no server checking the authentication then you can set the required rights with dcomcnfg.exe. Set the Authentication level of the W41Server to None and the default impersonation level of to Impersonate. After changing the values you have first to reboot your machine.
Drivers 79
If "dcomcnfg.exe", is not available on your computer (as it is not on all WINDOWS CD's), you have to download it from the following address: http://www.microsoft.com/com/dcom/dcom95/download.asp http://www.microsoft.com/com/dcom/dcom98/download.asp
DB-25
2 3 4 5 6 7
DB-9
3 2 7 8 6 5
80 Drivers
DCD DTR
8 20
1 4
In most devices pin 1 (25-Connector.) is connected to frame ground. In data communications this connection is normally not needed. If shielded cable is used the shield must be connected to pin 1. Designation of connections: Line
GND TXD RXD
Level
Signal Ground (0V) Transmit Data (idle = "1" = -12V) Receive Data (idle = "l " = -12V)
In the connections described next, "TRUE" ("1") corresponds to +12V and "FALSE" ("0") to -12V. Line
DTR RTS CTS DSR CD RI
Explanation
Data Terminal Ready (computer ready) Request To Send (computer ready to send) Clear To Send (modem or receiver ready to send) Data Set Ready (modem/receiver ready to receive) Carrier Detect (modem detected transmitter carrier) Ring Indicator (modem has detected a call)
Some devices are polling the handshake signals. To circumvent this, only a jumper between pins 4 and 5 and another jumper between pins 6, 8 and 20 (25-pin connectors) is necessary. Another problem may arise from the fact, that many devices do not have a direct RS-232 connector. To overcome this deficiency, another interface is needed. Mostly the only function of this interface will be to translate the V.24-level (+/-12V) to TTL level (5V). Suitable boards are available from shoc.
Drivers 81
powered on later, or the connector plugged in again, then normal operation is resumed.
IR Ports
Be careful with LAPTOPS. Sometimes the operating system handles the IR (Infra Red) ports like serial ports. The operating system will report to the application that for example COM3 exists. But in reality this is the IR port. If the driver new starts to talk with the comport you will receive error messages as the software interface of the IR port is not compatible with the RS232 ports.
Decoder
WAVECOM 4100DSP
Dec Driver
Dec Computer Dec Address
W4100DSP
NA NA
Example
01
Explanation
allways locla for COM1
Today W4100DSP and W4050DSP are no longer in production. In the WAVECOM version the drivers for this two decoders are not included. If you like to use one of this two decoders for SAT C then please contact shoc. Its up to you to set the decoder to INMARSAT-C mode and to enable the data output in Text and Hex mode. It this settings are not OK, you will receive a warning message from the SAT C MON. We recommend to use Fano error correction. Please note that the baud rate of the decoder is fixed to 9600 baud and the decoder address is 01. You will need a Com port for each decoder otherwise it will not be possible to get all the text without loosing data. Remember to set the address and baud rate for serial # 2 (W4100SETUP) every time you load a new software version from Wavecom.
WAVECOM 4050DSP
Use same driver as W4100DSP
WAVECOM 41PC
Dec Driver
Dec Computer Dec Address
W41PC
Var Var
Example
data2 1
Explanation
Card is on computer: \\data2 Card No 1
82 Drivers
Setup the W41PC and check if all the functions are available. Its up to you to set the decoder to INMARSAT-C mode and to enable the data output in Text and Hex mode. It this settings are not OK, you will receive a warning message from the SAT C MON. . We recommend to use Fano error correction. If you work remote, Install the W41PC or W51PC software on your remote computer. Test if you can control the decoder from the remote computer. If the card is installed on the same computer as you run the SAT C Monitor, then enter no value.
WAVECOM 51PC
Same settings as W41PC
Product Information
Database/Tables
General
Average data received on a SAT C channel: 5-10 Mbytes/day Item
Maximum # of records per table file Maximum size of a table file
Limits
1 billion 2 Gigabytes
Product Information 83
65,500
If you have to store more then 2 GBytes of data, please contact shoc
SAT C tables
sat_c sat_ch
I10 I3 I8 I5 I4
I2 I9 I7 I6
time lesid ch seq ready messtype txt hex freqcode setname satc_id remarks
DateTime Integer Integer Integer Logical Char(1) Memo Memo Integer Char(20) Char(32) Char(20)
I8 I3 I6 I5 I4
I2 I7
DateTime Integer Integer Integer Logical Char(1) Memo Memo Integer Char(20)
84 Product Information
Addresses
Manufacturing and world-wide sales
shoc, R.Haenggi Hardstr. 45 CH-8424 Embrach Switzerland Tel. +41 - 79 - 421 5037 Fax +41 - 79 - 403 1957 e-mail: support@shoc.ch http: //www.shoc.ch shoc
In case of problems
If problems arise with your copy of shoc SAT C MON please, first study this help file and the READ.ME (if one exists) closely. Check the size of free memory which your PC leaves to the program. Never try to run the software if WINDOWS is not running properly. Program crashes during loading Cause : Not enough memory Not all files on disk Hard disk full Incorrect DLL's.
WINDOWS are not correct displayed Cause : "Clear Resource" in User Lis
Product Information 85
Glossary of Terms
Glossary of Terms 87
P
Preview 15, 35, 39, 77 Print 10, 15, 28, 39, 77
Index
R
Range 30 Receiver 81 Reindex 20 Report 3, 28, 38, 77 Reports 3, 35, 38 Resize 39 RS-232 80
C
Call 16, 26 Channels 1, 10 Check Box 75 Clipboard 16 Com-Port 3
S
Shift 32
T
Terminal 81
D
Decoder 2, 7, 10, 79
U
Undo 16, 28 User 15, 25, 39, 85
F
F1 22
W
Wavecom 1, 82 WINDOWS 95 3, 7, 79
G
Grid 27, 47
H
Help 2, 22, 49, 8385
L
Lines 36, 42
M
Memo 20, 29 Month 66
N
Note 7, 11, 18, 26, 44
O
OLE 16, 42 Order 1, 27, 40 Others 34
Index 89