R E P O R T W R I T E R
Overview
Reports and Forms
We usually think of reports as things like a sales report or receivables aging, and forms as things like an invoice, statement, or check.
In ProBooks, both modifiable reports and modifiable forms are printed using a Report Form, which can be modified using the Report Form Designer.
|
Report Writer 2-1 |
Standard and Modifiable Forms and Reports
Many of ProBooks reports have a standard format that is not modifiable, and a [Form] option that lets you run a modifiable report form you can change to suit your preferences or needs.
Form
The [Form] button in the report dialog loads a Report Writer setup that has information on the data files used in the report, the report or label form used to format the report, and other options, like sort order, and which records to include in the report.
Report Setups are stored in report setup cards. Report Forms are stored in report form files. You can change report setups by editing the report setup card. You can modify report forms using the report form designer.
ProBooks forms... invoices, purchase orders, checks, statements, etc., are printed using a modifiable report form.
Modify
The [Modify] button in form printing dialogs, like Sales Forms and Purchase Forms, activates the report form designer without going through the Report Writer.
You can create an unlimited number of report writer setups, and as many variations of any report form as you need.
Complex
The Report Writer has complex capabilities. Users with advanced skills will appreciate having the ability to create the reports they need. Many users will find the abundance of options overwhelming.
Simple
Yet even users with only very limited knowledge of computers will be able to rearrange objects in a report form by dragging and dropping them with the mouse.
Or beautify their forms by changing fonts, adding boxes, lines, or pictures.
ProBooks Report & Label Forms Files
ProBooks report forms are loaded into the directory \PROBOOKS\REPORTS when ProBooks is installed.
ProBooks looks in several directories for reports and labels files in this
order:
\PROBOOKS
\PROBOOKS\UREPORTS
\PROBOOKS\REPORTS
The \PCA\REPORTS directory is intended to be used for ProBooks sample
forms.
Report Forms
Each Report Form consists of two files, with the extensions
.FRX and .FRT
Label Forms
Each Label Form consists of two files, with the extensions
. LBX and .LBT
|
2-2 Report Writer |
Modifying a Copy
of the Original
When you select [Modify], if there is not already a form with the specified
name in \UREPORTS, and ProBooks finds a report form with the specified
name in \REPORTS...
ProBooks will place a copy of the original form in
\UREPORTS, and this will be the form you modify.
This will leave the original
sample unchanged in \REPORTS, should you need to refer back to it.
[ForM]- Running a Report Writer Setup
Report Options
Report/Label
Report or Label indicates whether this is a report setup or a label setup.
|
Report Writer 2-3 |
Setup
The name of the report writer setup.
Form
The report or label form for this report setup.
Description
The long description of the report setup.
Quick Report
Checking [X] Quick Report sets the From and To range to a single record. For example, when you want to print the information from a single customer card.
When you uncheck [ ] Quick report, From and To will default to the first and last record in the file.
When Quick appears in the report description, the report setup originally was a Quick Report setup for a single record.
Summary
Report forms can have detail bands and groupings.
When [X] Summary is checked, detail bands are not printed.
When [ ] Summary is unchecked, detail bands will be printed.
Descending
When [X] Descending is checked, the report will be printed in descending sort order.
When [ ] Descending is not checked, the report will normally be printed in ascending order.
Order
Select [Order] to pick from the available index keys for the selected file. The index key determines the order in which records appear in the report.
You can also create a custom index on-the-fly in Advanced Report Options. Select [More>>] to activate the advanced report options dialog.
Filter
Select [Filter] to add a filter, or change the default filter. The filter controls which records will appear in the report. Filters are Visual FoxPro expressions which describe how records are to be selected. More detailed information on expressions can be found later in this chapter.
Copies
You can enter the number of copies of the report or label to print, or click on [+] or [-] to increase, or decrease the number in the copies field.
Range
[Range] selects the field used with From and To to determine the range of the report.
For example: If the Range field is CUSTNO, From and To will be the Beginning and Ending Custno to be included in the report.
If the Range field is STATE, From and To will be the beginning and ending STATE to be included in the report.
From
From selects the beginning of the range to be included in the report.
To
To selects the end of the range to be included in the report.
|
2-4 Report Writer |
For
For is an additional expression that can be used to select records, just like filter.
Fields
You can use Fields to limit your selection to specific fields in
File 1.
Fields are entered separated by commas, as in:
CUSTNO, COMPANY, ADDRESS
Index
Select [Index] if you want to create an on-the-fly index for your report.
If the index key you want is in the Keys list ([Order]), its faster to select a key from the list.
Report/Label
Select Report if Form is a Report Form, Label if Form is a Label form.
Form
The name of the report or label form used to print this report setup.
Path
The location of the report or label form. Path will normally default to \UREPORTS, but if you want to specifically use a form in another directory, select the directory here.
Modify
Select [Modify] to activate the Report Form Designer to modify the selected Report or Label form. For details on modifying report and label forms please see [Modify] -Modifying Report and Label Forms, later in this chapter.
|
Report Writer 2-5 |
Preview
You can also select Preview to show a graphical representation of how your printed Windows report will look.
But we found that viewing the entire report in a scrollable editor window was far more useful, when youre concerned with looking at whats actually in the report, and not just how good it will look in print.
You can select [Display/Log] even if your report form has Windows objects. When you select [Display/Log], and your report form has both Windows and DOS objects, ProBooks makes a temporary report form with only the DOS objects to facilitate the [Display/Log] feature.
If you [Modify] a report form that has only DOS objects while running ProBooks/Visual FoxPro Windows, the Visual FoxPro Transporter will appear, and you will have to transport the form, creating Windows Objects for the file.
You can [Modify] the form in ProBooks DOS, however, without having to transport it.
You cant run a form that has only Windows objects in ProBooks DOS without first transporting it to create Windows objects.
Load Setup
[Load] Setup loads a Report Writer setup.
Save Setup
[Save] Setup saves the current report setup, to a report setup card you can [L]oad again later.
Modify Setup
[Modify Setup] activates the Report Writer setup cards window, so you can change report setups.
1/2/3/4/5
Each report setup has one header screen and an additional screen for each of five files. [1], [2], [3], [4], and [5] take you directly to screen 1/2/3/4/5 of the report setup card.
Open Files
One to five files and their related indexes will be automatically opened depending on the area of the program you are working in.
File
The alias (short name) of the file.
Relation
Relation is the field in File1, which is related to the index key field in File 2 - 5.
Order
The index field key in each file.
In the example above:
File1 is the Customer file, which is indexed on customer number.
File2 is the Payroll file which is indexed on Employee number. The record pointer in the Payroll file will be placed at the record which corresponds to the salesman number in the current record in the customer file.
File3 is the General Ledger file, indexed on Account Number. The record pointer in the General Ledger file will be automatically positioned at the record with the same account number as the customer file default account.
File4 is the Terms file, indexed on the payment code in the customer file.
|
2-6 Report Writer |
File5 is not used in this report setup.
Select [Print] to print the report using the current settings.
Display/Log
Select [Display/Log] to display the entire report in an editor window. This will allow you to scroll back and forth through the report as desired. You can also cut, paste, and edit the display/log file, PCA.LOG and save the modified file with a new name.
Browse
Select [Browse] to view the selected file in a Browse window.
Export
Exporting Data to Another File Format
Select [Export] to export data from File1 to another file in any of the available formats.
Select the format you want to export to, then select [Export]. ProBooks will create a file name like File1, but beginning with X, in the [Target] directory, then display the file in a Browse, or Editor window.
|
Report Writer 2-7 |
Filter
Select [Filter] to create a filter expression which will specify which records to include in the report.
You can create a filter with the Look For Something dialog, select a filter from the Filters List, or create an expression using the Expression Builder.
For more information on using Look For Something, please refer to Using ProBooks.
To display the Expression Builder dialogue, select [Expr] when the Report Expression dialog box is displayed.
The expression builder can help you select the fields to be used in the report. It also can help you create expressions which allow you to set specific criteria for determining whether individual records are to be included in the report.
From Table
Your report writer setup can have up to five related tables open at the same time.
The Fields list will display the fields in the selected table.
|
2-8 Report Writer |
To display the fields from another table, select the table from the tables list. In DOS, select from the tables popup in the center of the Expression Builder dialog box.
The .DBF Database File consists of a file containing records and their fields, along with a header which has information on the fields in the file.
You might think of fields as the columns in a spreadsheet, and records as the rows in a spreadsheet.
A .DBF file can have an unlimited number of records (well, actually up to one billion records).
In ProBooks, a set of .DBF files, and their associated .FPT and .CDX files, make up a set of books.
In proper database terminology, these individual files are referred to as tables, and the collection of files, as a database.
In DOS
In ProBooks for DOS Database is generally used to refer to a .DBF file, or table.
In Windows
In ProBooks for Windows Table is generally used instead of Database, when referring to a .DBF file.
Fields are the individual items of information contained in each database record. In the customer database, for example, some of the fields are CUSTNO (the customer code), COMPANY (the customers name),
Fields are roughly equivalent to columns in a spreadsheet.
ADDRESS1 (the customers address), etc.
A Database Record consists of one set of all fields for the database. In the customer file, there is one record for each customer. A report will generally print one line for each record which meets the selection criteria.
Records are roughly the equivalent of rows in a spreadsheet.
Memory Variables are names, set up by a program, to hold varying values.
Memory Variables are like fields except that they are stored in memory instead of in a disk file.
For example, when you activate a set of books in ProBooks, ProBooks stores the company name you enter in your company setup card to a memory variable named CNAME.
Memory variables like CNAME can be used in report forms.
Operators are used to connect or manipulate fields and variables in expressions. There are different classes of operators as follows:
Math Operators perform mathematical operations like + and -.
String Operators perform character string manipulation.
|
Report Writer 2-9 |
Logical Operators create logical relationships.
Date Operators provide various manipulations of dates.
Fields are selected from the Fields list. To select fields from File2-5 select from the tables displayed in the Tables list in Windows, or the Databases Popup in DOS. The fields from the selected file will be displayed in the Fields window.
Select memory variables from the memory variables window. Connect fields and/or variables with operators selected from the operators Pop-ups. When you think youve completed the expression, [Verify] the expression.
Then select [O]K to save the expression.
[Verify] will sometimes tell you an expression is not valid, even though
it would, in fact, work when you actually run your report.
This can be because
some memory variables that will be available when you run the report from
a specific report program, are not currently set up, or for another similar
reason.
When in doubt, run the report, and see if it works.
String Functions and Operators
The expression builder popups allow you to pick from available Visual FoxPro
functions and operators. The popups list a brief description showing the
purpose and usage of each function.
|
2-10 Report Writer |
Commonly Used String Functions and Operators
text
Character expressions must be enclosed in or .
Kirkland means the character string Kirkland.
Kirkland means a memory variable named Kirkland.
+
+ connects two expressions.
Kirkland + , WA returns KIRKLAND, WA.
$
$ means contains.
WA $ WA OR ID returns .T.(true),
because WA is contained in WA OR
ID.
ALLTRIM()
ALLTRIM() removes leading and trailing spaces from a character string.
ALLTRIM(CITY), where CITY=" KIRKLAND
returns KIRKLAND".
LTRIM()
LTRIM() removes leading spaces from a character string.
LTRIM(CITY), where CITY=" KIRKLAND
returns KIRKLAND .
RTRIM()
RTRIM() removes trailing spaces from a character string.
RTRIM(CITY), where CITY=" KIRKLAND
returns KIRKLAND".
LEFT()
LEFT() returns the specified number of characters starting from the beginning of an expression.
LEFT(KIRKLAND,4) returns KIRK.
LOWER()
LOWER() converts a character string to lower case.
LOWER(KIRKLAND) returns kirkland.
|
Report Writer 2-11 |
UPPER()
UPPER() converts a character string to upper case.
UPPER(kirkland) returns KIRKLAND.
PADC()
PADC() pads an expression with spaces to center it in a column of the specified width.
PADC(ProBooks,80) returns 41 spaces + ProBooks + 41 spaces.
PROPER()
PROPER() converts a character string to upper case.
PROPER(KIRKLAND) returns Kirkland.
RIGHT()
RIGHT() returns the specified number of characters starting from the end of an expression.
RIGHT(KIRKLAND,4) returns LAND.
SOUNDEX()
SOUNDEX() returns the phonetic value of a character string.
SOUNDEX() can be used to tell if one character string sounds like another.
SOUNDEX(SMITH) = SOUNDEX(SMYTH) returns .t. (true),
because the phonetic
value for both SMITH .and SMYTH are the same.
STR()
STR() converts a character expression to a numeric expression, with the specified number of decimal places.
STR(1000.123456,2) returns 1000.12"
STR(1000) returns 1000"
You can use STR() with ALLTRIM() to remove leading spaces from the expression returned by STR().
ALLTRIM(STR(1000)) returns 1000".
|
2-12 Report Writer |
Logical Functions and Operators
The expression builder popups allow you to pick from available Visual FoxPro functions and operators. The popups list a brief description showing the purpose and usage of each function.
Commonly Used Logical Functions and Operators
<
< means less than.
>
> means greater than.
=
= means equals.
==
= = means exactly equal to.
Use of = and == can be confusing but heres a simple example.
WA = WASHINGTON,
|
Report Writer 2-13 |
Because when = is used, WA is only compared only with the first two characters
of WASHINGTON, and they are alike.
WA does not == WASHINGTON"
Because WA is compared with the entire string WASHINGTON, and they are not alike.
>=
>= means equal to or greater than.
<=
<= means equal to or less than.
<>
<> means not equal to.
!
! also means not equal to.
.T.
.T. means true.
.F.
.F. means false.
.NOT.
.NOT. means not
.NOT. STATE = WA means STATE is not equal to WA.
.AND.
.AND. means and.
For example: STATE = WA .AND. CITY = KIRKLAND
would be true if both STATE is WA and CITY is KIRKLAND.
.OR.
.OR. means or
For example: STATE = WA .OR. CITY = KIRKLAND
would be true if either STATE is WA or CITY is KIRKLAND.
EMPTY()
EMPTY() means is the expression empty?
If STATE = , EMPTY(STATE) would be true.
iif()
IIF() means something like
if this is true, do this, otherwise do that.
IIF(EMPTY(ADDRESS2,CITYST,ADDRESS2)
when used in a report form means:
if
ADDRESS2 is empty,
print CITYST,
otherwise, print ADDRESS2.
This expression could be used to avoid printing a blank line, if there were no second address line in an invoice, address label, etc.
|
2-14 Report Writer |
Date Functions
The expression builder popups allow you to pick from available Visual FoxPro
Date functions. The popups list a brief description showing the purpose
and usage of each function.
Commonly Used String Functions and Operators
{}
Enclosing a date character string in {} identifies it as a date.
{08/01/95} equals CTOD(08/01/95).
CDOW()
CDOW() returns the day of the week for a date.
CDOW(CDATE), when cdate is 08/01/95 = Monday.
CMONTH()
CMONTH() returns the name of the month for a date.
CMONTH(CDATE), when cdate is 08/01/95 = August.
CTOD()
CTOD() converts a character expression to a date expression.
|
Report Writer 2-15 |
CTOD() 08/01/95" returns a date expression of 08/01/95.
DATE()
DATE() returns as a date expression, the system date of your computer.
DTOC()
DTOC() converts a date expression to a character expression.
DTOC(CDATE), when CDATE equals 08/01/95, returns 08/01/95".
TIME()
TIME() returns the system time from your computer as a character string, like 12:00:00:01".
Math Functions
The expression builder popups allow you to pick from available Visual FoxPro
Date functions. The popups list a brief description showing the purpose
and usage of each function.
Commonly Used Math Functions
ROUND()
ROUND() rounds a number to the specified number of decimals.
ROUND(1000.123456,2) returns 1000.12.
ROUND(1000.123456,0) returns 1000.
|
2-16 Report Writer |
VAL()
VAL() converts a character expression to a numeric expression.
VAL(1000") returns the number 1000.
For More Information
The ProBooks manual is not intended to provide a complete or thorough explanation
of the Visual FoxPro language.
For more detailed information on Visual FoxPro
language functions and operators, a reference book on Visual FoxPro, or
the Visual FoxPro standard edition, is recommended.
Contact PC Accountant
Customer Support for a current listing of Visual FoxPro reference books
and where they can be purchased.
ProBooks and Visual FoxPro Memory Variables
ProBooks loads several memory variables, using information in your company setup card, when you activate company.
Visual FoxPro also maintains memory variables on report settings, including page number.
You can use these memory variables in your report forms.
_PAGENO is the current page number.
CNAME is your company name.
CADDRESS1
CADDRESS1 is the first line of your companys address.
CADDRESS2
CADDRESS2 is the second line of your companys address.
CCITY
CCITY is your companys city.
CSTATE
CSTATE is your companys state.
CZIP
CZIP is your companys zip code.
The expression: CCITY,CSTATE,CZIP will print your companys city, state and zip in this format, if you include a , in the City field in your company setup card.
KIRKLAND, WA 98083
|
Report Writer 2-17 |
CPHONE
CPHONE is your companys phone number.
LASTPAGE
LASTPAGE is set to .T.(True) by the placing the LASTPAGE() function in
a report form.
In ProBooks Windows report forms, use LASTPAGE as the 'Print
When' expression, for page footer objects that are to be printed only on
the last page of a multipage form.
ProBooks Forms Functions
ITEM()
ITEM() returns .T. if a record is an item record, .F. if a record is not an item record.
ITEMNO()
ITEMNO() returns the Item Number from an item record.
COMMENT()
COMMENT() returns .T. if a record is a comment record, .F. if a record is not a comment record.
COMTEXT()
COMTEXT() returns the comment text from a comment record.
AMOUNT()
AMOUNT() returns .T. if a record is an amount record, .F. if a record is not an amount record.
BOM()
BOM() returns .T. if an invoice record is from a bill of materials.
RETURN()
RETURN() returns .T. if an invoice record is for a sales return credit memo.
CREDIT()
CREDIT() returns .T. if a record in the inventory/invoice detail file is for a cash receipt credit (deposit).
LASTPAGE()
ProBooks Windows report forms use the function LASTPAGE() and the memory variable LASTPAGE to facilitate printing page footer items in only the last page of a multi-page form.
|
2-18 Report Writer |
Report Setup Cards
Edit
To change the current report definitions select [Edit]
When youve finished making changes press [Esc], or click on [Done].
Add a New Report
To add a new report press [Add].
When youve finished making changes press [Esc], or click on [Done].
If you want to create a report setup that is similar to any thats loaded
using the [Form] button in a report dialog, simply select [More>>], then
[Save Setup]. Then select [Modify Setup] and make changes to the setup
you just saved.
Delete Report
Select [XDel] to delete report setup card.
|
Report Writer 2-19 |
Copy Report
Select [Copy] to create a copy of current report setup card with a new name. This feature is useful when you want to create variations of existing reports.
Run
Select [Run] to activate the Advance Report Writer with this setup, so you can Print, Browse, Modify or Export using this report setup.
Memo
Select [Memo] to edit the memo field for this report setup. You can use the memo field for any kind of notes you want to keep on the report setup... its purpose, why its set up the way it is, etc.
If you print a listing of expressions in this report form (see below) to Log, you could also mark and [Copy] the contents of PCA.LOG to the clipboard, then [Paste] the clipboard into the memo field.
Info
You can print a listing of all of your report setups, or all of the expressions in any report form by selecting Info.
Printing a Listing of Report Setups
Reports Setups Report
This option loads a Report Writer setup to print a listing of report setups. The report setup uses the form REPORTS to print information from the report setups file AREPORTS.
Printing a Listing of the Expressions in a Report Form
This Report Form Report
This report uses a report form name REPINFO to list the fields POSITION and EXPR in the report form .FRX file.
You could modify this report form to include additional information from the report form file, like font or pitch, if desired.
The name for this report setup.
Name
A descriptive name for the report.
Report/Label/Filter
Indicates whether this is a report, label or filter setup.
Filter setups store a filter name, which will appear in the Filters List when using the [=Filter] feature.
File1
The name of the first data file. Look-up a valid file name by opening the Files List window by pressing the up cursor key.
Index1
If youve selected a file from the Files List, the index field will be filled in with the name of the primary index key for the file.
Otherwise enter the index key to be used for the report. An index is optional, but generally an index is used control the sort order of the report.
|
2-20 Report Writer |
Most data files in ProBooks have at least two index keys in a compound index file (.CDX).
For example, the Customers file has keys for CUSTNO and COMPANY, and several others. If you select CUSTNO, your report would be sorted by customer number. If you select COMPANY, your report would be sorted by company name.
Creating a Custom Index
If you want your report sorted by other than one of the standard indexes,
you enter the index key and a custom index will be created for the report.
Enter the sort field name preceded by a _ to select a custom sort order.
For example:
_ZIP creates a custom index on the ZIP field.
_COMPANY creates a custom index on the COMPANY field.
_SALESMN creates a custom index on the SALESMAN field.
In each case the report output will be sorted according to the order of the selected index key field.
Relation1/2/3/4/5
The optional relation, if required.
Filter1/2/3/4/5
An optional filter. Filters must be entered in Fox+/DB3+ format.
File2/3/4/5
Optional data files.
|
Report Writer 2-21 |
[Modify] - Using The Visual FoxPro Report Form Designer
Creating & Modifying Report & Label Forms
Report Forms
ProBooks includes dozens of modifiable report forms you can use as is, or modify to suit your special needs and requirements.
Label Forms
Most of the features which apply to reports also apply to labels. You can include any fields in the file, sort on any field in the file, specify any width and length label, as well as the number of labels across on a page.
Page Layout
Reports can be formatted for any width and length. Pages can be automatically numbered. You can design your report to use normal or compressed print. In Windows you can use any of your available fonts.
Bands
Report forms can include Title Bands, Page Header Bands, Detail Bands, Page Footer Bands, and Summary Bands.
Groupings
You can design your reports to group related data together and show subtotals and totals.
An expression builder helps you select fields and create expressions from the fields in the files you select.
|
2-22 Report Writer |
Title bands are printed at the beginning of a report. Page Header bands are printed at the beginning of each page. Detail Bands contain the report detail and consist of fields and expressions from the selected data files.
Page header will be printed at the beginning of each page. The report header usually will include the company name and the name of the report
Page Footer bands are printed at the end of each page.
Summary bands are printed at the end of each Group.
Data can be grouped on specified fields within the report. For example, a customer list might be grouped by salesperson. An inventory transactions list might be grouped by invoice number.
Select [Data Grouping] from the Reports menu to add a group. When prompted, enter a name for the group. Group bands will be added to the layout, one above and one below the field bands. You will need to enter either Text or a Field Expression in the Group bands before they will be printed
Group Header Bands
Group header will be printed at the beginning of each data grouping.
Group Footer bands are printed at the end of each data grouping.
Subtotals can be printed for any group, page, or report using the Calculate options in the Expression dialogue.
ProBooks Report & Labels Forms Files
ProBooks report forms are loaded into the directory \PROBOOKS\REPORTS when ProBooks is installed.
ProBooks looks in several directories for reports and labels files in this
order:
\PROBOOKS
\PROBOOKS\UREPORTS
\PROBOOKS\REPORTS
The \PCA\REPORTS directory is intended to be used for ProBooks sample
forms.
Each Report Form consists of two files, with the extensions
.FRX .and.
.FRT
Each Label Form consists of two files, with the extensions
. LBX .and. .LBT
|
Report Writer 2-23 |
When you select [Modify], if there is not already a form with the specified
name in \UREPORTS, and ProBooks finds a report form with the specified
name in \REPORTS...
ProBooks will place a copy of the original form in \UREPORTS,
and this will be the form you modify.
This will leave the original sample
unchanged in \REPORTS, should you need to refer back to it.
BLACK OBJECTS in a report form
Sometimes a report form created in one version of Visual FoxPro Windows will display or print black objects when you modify, or run the report, in another version of Visual FoxPro Windows.
This can happen when you modify a report form created in the Visual FoxPro Standard edition, when running ProBooks using the Visual FoxPro Support Library (runtime).
To make these objects display properly:
The black objects should now appear normally.
If there is no report setup which uses the form you want to fix, select [Add], and add a report setup. Use the name of the form for the Setup name, and also enter the name of the form in the Form field.
|
2-24 Report Writer |
Report Options Menu
Whenever you activate the report form designer, the Visual FoxPro system menu bar will be displayed at the top of the screen, and a Report button will appear in the menu bar.
Page Layout
Page Layout activates the Page Layout dialog box, where you select the page size and layout, and other options.
Page Preview
Page Preview displays the report in Preview mode.
Show Position
In Windows, Show Position turns on and off the position display at the bottom of the screen.
Ruler/Grid
In Windows, Ruler/Grid turns on and off the display of a grid on the form.
Snap to Grid
In Windows, Snap to Grid turns on and off the snap to grid feature. When snap to grid is on, objects will be automatically positioned to align with the closest grid line, when you reposition them.
Title/Summary
Select [Title/Summary] to add a title or summary band to your form.
Data Grouping
Select [Data Grouping] to add a group band to your form, or to change or delete an existing group band.
|
Report Writer 2-25 |
Variables
Select [Variables] to add, change, or delete report memory variables. Report memory variables are memory variables that are set up when the report is run. Report memory variables might be used to calculate totals or counts, or for other purposes.
Every Text item or Field item in the form is referred to as an object. You can move these objects around on the form to control the way the printed or displayed report will appear.
Windows
To move an object in Windows, click on the object with the mouse, hold down the mouse button and drag the object to its new position in the form, then release the mouse button.
Adding Objects
Expression Object
To add a new field in ProBooks Windows, click on the [ab] icon with the mouse, then click again where you want to place the object in the form.
To add a new field in ProBooks DOS, place the cursor where you want the new field to be located in the form and press [Ctrl][F].
The Report Expression dialogue will be displayed. Enter the report expression and select any appropriate options.
For a more detailed explanation of the Expression Builder please refer to Using the Expression Builder in this chapter.
|
2-26 Report Writer |
Creating Expressions
An expression can be as simple as a field name such as CUSTNO, the customer code field in the Customer File (&ARCUSTO), a system memory variable such as CNAME, the Client(Company) Name, or can be more complex, such as
LEFT(ITEMNO,15) (Inventory Item Number without Warehouse Code)
An expression can also combines two fields:
UNITPR * QTYSHP (Invoice Line Total)
Examples
Explanations of the fields and expressions used to create the alternate invoice form INVOICE are located at the end of the chapter.
Text Object
To add a text object in Windows, click on the [A] icon, then click again at the position you want to place the object in your form. Then type the characters on your keyboard.
To add a text object in DOS, move the cursor to the position you want your text object to be placed in the form, then type the characters on the keyboard, followed by [CR].
To add a box or line object in Windows, click on the line, square box, or rounded box icon, then click again at the position you want to place the object in your form. Size your line or box by clicking on the edges and dragging with the mouse.
To add a line or box object in DOS, move the cursor to the position you want your text object in the form, then press [Ctrl]+[B]. Use the arrow keys to size your box or line.
Picture Object
In Windows you can add .BMP pictures. Click on the picture icon (the last one in the toolbox), then click again where you want your picture in the form. The picture picker dialog will appear. Select the .BMP file for your picture, and select from the various formatting options in the dialog box.
Deleting Objects
In Windows, click on the object you want to delete, then press [Del].
In DOS, press [Del] when the cursor is over the desired object.
Adding Lines
To add a new line of the type where the cursor is located, press [Ctrl][N].
Deleting Lines
To delete the line where the cursor is located, press [Ctrl][O].
|
Report Writer 2-27 |
Environment
Always select Clear. If you Save Environment, forms designed to be used
from multiple screens (like INVOICE, PO, PACKLIST) may not work properly
in different ProBooks modules, or with a different set of books.
Form Width and Length
Form width and length are controlled by the Windows Printer thats currently selected, and the Paper Size selected in the Setup Printer dialog box.
Print Setup
Select [Print Setup] to select a different printer or paper size.
Columns
Set the number of columns in your form by entering a number, or using the spinner to change the number of columns in the column field
Margins
The left margin setting appears just below the Column setting. You can enter a number, or use the spinner to adjust the left margin.
|
2-28 Report Writer |
Printable Page
Most laser printers cannot print on the 1/4" margin bordering the page.
If you select Printable Page the report form designer will take this into account.
Font
Select [Font] to select a default font for the report. You can also select a font for any object in your form by clicking on the object, then selecting [Object] from the menu bar, then [Font].
Page Preview will display a preview of the report output.
Page Preview can also be used to locate the source of errors in the report
form. When Preview is selected, if there is an error in a report form expression,
the error message will be displayed, and upon pressing escape, the cursor
will be positioned on the field which contains the error.
|
Report Writer 2-29 |
For more information on errors in report forms see the topic Troubleshooting
Report and Label form errors in this chapter.
Quick Report
Quick Report can help you create a report form, by letting you pick fields from the files selected for your report.
Add Alias
[ ] Add Alias should normally be unchecked for ProBooks report forms.
Form/Column
Column Layout means fields will be arranged across the page. Form layout means fields will be arranged one above the other, each on a separate line.
Titles
If you check [X] Titles, the field names for each field will be added as text objects above each selected field added to your report form.
Fields
If you check [X] Fields, a Field Picker dialog box will be displayed.
Double click on a field in the Fields list to move it to the Selected Fields list.
When you have the fields you want in the Selected Fields list, select [OK].
Then select [OK] again in the Quick Report dialog box to add the selected fields to your report form.
Next, rearrange the fields if you like, and add formatting options as appropriate.
|
2-30 Report Writer |
Adding a Data Grouping
Data Groupings allow you to group the data in your report. You might want to group data:
When you run a report with groupings, if you check the [X] Summary option, detail bands are not included in your report.
In the example above, a data grouping is used so that if the [X] Summary option is checked, memo information on each customer is not printed.
New Page
If [X] New Page is checked, each data grouping will begin on a new page.
Reprint Header
If [X] Reprint Header is checked, the page header will be reprinted before each group header.
Reset Page Number
If [X] Reset Page Number is checks, the page number will be reset with each grouping.
Number of Rows following Header
|
Report Writer 2-31 |
If you enter a number of rows following header, the grouping will be started on a new page if there are less than the specified number of rows remaining on the current page.
Swap Page Header
In the DOS report from designer, Swap Page Header and Swap Page Footer provide additional control over when group headers and footers are printed.
ProBooks DOS report forms use these features in forms like Invoice, to print totals only on the last page of a multi-page invoice, or Letters, to print a header only on the first page of a multi page letter.
These options are not available in the Visual FoxPro Windows report form designer.
Different techniques are used in ProBooks Windows report forms to achieve similar results.
If you create a new report form and transport it from DOS to Windows, or Windows to DOS, some manual changes will be required to apply the appropriate technique to the transported form.
Please refer to the topic Printing Totals on the Last Page Only of a Multi-Page Form later in this chapter for details.
If [X] Swap Page Header is checked, the page header is printed in place of the group header on all but the first page of the report.
This is useful for multipage reports or forms. For example, a customer letter, where you use your letterhead on the first page, and plain stock on subsequent pages.
Swap Page Footer
If [X] Swap Page Footer is checked, the page footer is printed in place of the group footer on all but the last page of the report.
This is useful for multi-page reports or forms. For example, an invoice, where you want to show totals only on the last page of a multi-page invoice.
|
2-32 Report Writer |
Printing Totals on the Last Page Only of a Multi-Page Form
ProBooks forms use the function LASTPAGE() and the memory variable LASTPAGE to facilitate printing totals in only the last page of a multi page form.
Each time you begin a print job, ProBooks sets the memory variable LASTPAGE to .F. (False).
The function LASTPAGE() changes the memory variable LASTPAGE to .T. (True).
By adding a data grouping to a form, and placing the expression LASTPAGE() in the group footer of the data grouping that defines the end of the report, LASTPAGE is set to .T. (True) when all of the detail lines have been printed.
|
Report Writer 2-33 |
By formatting objects in the page footer that are to print only on the last page of a multipage form with the 'Print When' expression LASTPAGE (meaning LASTPAGE=.T.), these objects will be printed only in the last page of your multi-page form.
|
2-34 Report Writer |
Formatting the way fields are printed
Style
Style can be used to control left, center, or right alignment of the printed output.
Style can also be used to print the expression in bold, italic, underline, subscript, or superscript format if a Printer Driver Setup is in use when the labels are printed. For more information on using Printer Driver Setups please refer to Add/Change Printers in the System chapter of this manual.
Calculate
Calculate can be used to show subtotals, totals, and item counts in your report forms.
Suppress
Suppress is used to Suppress Repeated Values. If a value of a field is the same, it will not be printed in subsequent records.
|
Report Writer 2-35 |
Stretch Vertically
Stretch Vertically will cause a field which is too large to fit in the width provided to flow to subsequent lines in the form. If stretch vertically is not checked, the field will be cut off. Only as much of the expression that will print in the allotted width, on one line, will be appear in the report.
Formatting Character Expressions
Format
Character expressions can be formatted with the various options shown in the Format dialog box.
These options allow you to control whether the field is printed right aligned, in upper case, centered, etc.
|
2-36 Report Writer |
Formatting Numeric Expressions
Format
Numeric expressions can be formatted with the various options shown in the Format dialog box.
These options allow you to control whether the field is aligned, blank if 0.00, etc.
Using a Picture to control printing of commas and decimals
Entering a picture made of 9s, commas, and decimals in the format field allows you to control the formatting of the printed number.
For example, if the number to be printed is 123456789.00
The picture will print
999,999,999.99 123,456,789.00
999999999 123456789
999,999.9999
456,789.0000
|
Report Writer 2-37 |
Reset
Reset determines at which point in the report the calculation is reset. This might be at the end of a grouping, the end of a page, or end of report, etc.
Nothing
The default setting is nothing. No calculation will be made.
Count
Count will calculate and show the amount of occurences of the expression.
Sum
Sum will calculate the total of all occurrences of the expression.
Average
Average will calculate the average of all occurrences of the expression.
Lowest
Lowest will show the lowest occurrence of the expression.
Highest
Highest will show the highest occurrence of the expression.
Std. Deviation
Std. Deviation will calculate and show the standard deviation for all occurrences of the expression.
Variance
Variance will calculate and show the variation for all occurrences of the expression.
|
2-38 Report Writer |
The Visual FoxPro label form designer works the same way as the Report Form designer.
In label forms, all objects are positioned in the page header band.
Label Menu Options
Preview
Select [Preview] to display how your labels will look in Preview mode.
Expression
Expression activates the Expression Builder dialog. You can use the Expression builder to help create expressions which define what will appear in your labels.
The Expression Builder is discussed in more detail in the previous sections of this chapter.
|
Report Writer 2-39 |
Environment
Always select Clear. If you Save Environment, forms may not work properly
in different ProBooks modules, or with a different set of books.
Add Alias
Normally, uncheck [ ] Add Alias when designing report or label forms for ProBooks.
Label Layout -
Environment
Always select Clear. If you Save Environment, forms designed to be used
from multiple screens (like INVOICE, PO, PACKLIST) may not work properly
in different ProBooks modules, or with a different set of books.
Form Width and Length
Form width, length are controlled by the Windows Printer thats currently selected, and the Paper Size selected in the Setup Printer dialog box.
Print Setup
Select [Print Setup] to select a different printer or paper size.
|
2-40 Report Writer |
Columns
Set the number of columns in your form by entering a number, or using the spinner to change the number of columns in the column field
Margins
The left margin setting appears just below the Column setting. You can enter a number, or use the spinner to adjust the left margin.
Printable Page
Most laser printers cannot print on the 1/4" margin bordering the page.
If you select Printable Page, the report form designer will take this into account.
Font
Select [Font] to select a default font for the report. You can also select a font for any object in your form by clicking on the object, then selecting [Object] from the menu bar, then [Font].
|
Report Writer 2-41 |
Label Preview
Page Preview
Use Page Preview to preview the way your labels will appear.
You can sometimes get a more accurate preview by saving your label form, then selecting (P)rint, then (L)og. This will display the label output in the PCA.LOG window.
|
2-42 Report Writer |
Forms Which Have Special Requirements
The following forms have special requirements which must be noted when creating or modifying these forms. Failure to follow these special rules will result in errors at times, when these forms are run.
INVOICE
ORDER
PLIST
PACKLIST
PICKLIST
QUOTE
LABE L
PO
Special Requirements for Sales/Order/Quote Forms
Invoice information for previously saved invoices is contained in two files,
the invoice header file &ARYINVOI and the transactions file &ARYTRANS.
When creating new invoices, information is stored in temporary files with
different names.
In order to be able to use the same INVOICE form when printing
an invoice different ProBooks modules (while entering an invoice, while
posting invoices, from saved invoices), it is necessary to use the file
pointer m-> or m. in these forms, for header/footer fields, and NO file
pointer for detail fields.
Similar rules apply to forms which print information
for QUOTES, ORDERS, and POs.
|
Report Writer 2-43 |
Invoice Header/Footer fields
For example, when modifying INVOICE forms, if you use the expression builder
to create expressions from the invoice header file ARYINVOI, it will create
an expression with the file pointer aryinvoi->
You must manually change
the file pointer
from:
aryinvoi->
to:
m-> or m.
You might also use some fields
from the detail file in your form header or footer.
To use fields from the
detail file in the header or footer, you must manually change the file
pointer for expressions from the detail file
from:
arytrans->
to:
m-> or m.
Invoice Detail fields
For example, when modifying INVOICE forms, if you use the expression builder
to create expressions from the detail file ARYTRANS, it will create an
expression with the file pointer arytrans->
example:
arytrans->qtyord
You
must manually remove the file pointer for expressions from the detail file
from:
arytrans->qtyord
to:
qtyord
INVOICE
ORDER
PLIST
PICKLIST
PACKLIST
Header and Footer lines (with the exception of those fields which use fields from the detail file) must use the file pointer M-> (or M.)
See Report Writer for more information on file pointers.
|
2-44 Report Writer |
In Header/Footer Lines (or expressions using Header file fields)
This
will work This WILL NOT WORK(1)
Example: M->CUSTNO ARYINVOI->CUSTNO
Example:
M->CUSTNO A->CUSTNO
Example: M->CUSTNO B->CUSTNO
Detail lines (or expressions using fields from the detail file)must have NO file pointer
In Detail Lines (or expressions using Header file fields)
This will work This WILL NOT WORK(1)
Example: QTYSHP ARYTRANS->QTYSHP
Example:
QTYSHP A->QTYSHP
Replace all occurrences of EXTPR with (QTYSHP*unitpr).The expression EXTPR
may be found in detail lines as well as footer totals.
This will work This WILL NOT WORK(2)
Example: (QTYSHP*UNITPR) ARYTRANS.EXTPR
Example:
(QTYSHP*UNITPR) A->EXTPR
Special Requirements P.O. forms
P.O. forms. In all fields there must be NO file pointer
This will work This WILL NOT WORK(1)
Example: QTYORD APPO->QTYORD
Example:
QTYORD B->QTYORD
(1)Alias Not Found error will result.
(2)Variable Not Found error will
result.
Special Requirements for Payables checks
ProBooks currently supports printing a center check with top and bottom stub
The positioning of the check and bottom stub is controlled by the number of page footer lines.
The Page Footer area of the form begins with the totals which appear on the top check stub.
If the check body starts too low on the page, increase the number of footer lines until the top stub totals and check body starts at the appropriate position.
|
Report Writer 2-45 |
Prior to check printing, ProBooks calculates the number of stubs for per check based on the maximum number of lines available on the top check stub.
As checks are printed, the contents of check stub lines 1-16 are stored to memory variables MSTUBLINE1-16. These memory variables can be used to duplicate the top stub on the bottom stub.
Form Layout for Laser Payables Checks
In Windows, select the Letter Size Paper Size
IN DOS, set the number of lines per page in Report, Layout to 63.
Form Layout for Tractor Payables Checks
In Windows, select the User Defined Paper Size.
In Windows Control Panel, set the User Defined Paper Size for the printer you use for printing tractor checks to 850 x 750 (.001 inches).
IN DOS, set the number of lines per page in Report, Layout to 48.
After making changes to your user defined forms TEST THEM using the ProBooks Model company before using them with your live data.
Special Requirements for Payroll checks
ProBooks currently supports printing a center check with top and bottom stub
The entire check is laid out in the Page Header area of the form.
Form Layout for Laser Checks
In Windows, select the Letter Size Paper Size
IN DOS, set the number of lines per page in Report, Layout to 63.
Form Layout for Tractor Checks
In Windows, select the User Defined Paper Size.
In Windows Control Panel, set the User Defined Paper Size for the printer you use for printing tractor checks to 850 x 750 (.001 inches).
IN DOS, set the number of lines per page in Report, Layout to 48.
After making changes to your user defined forms TEST THEM using the ProBooks Model company before using them with your live data.
|
2-46 Report Writer |
After making changes to your user defined forms TEST THEM using the ProBooks
Model client before using them with your live data. An error in one of
these forms could cause corruption of data that can be complicated (if
not impossible) and time-consuming to recover from.
|
Report Writer 2-47 |
Checklist:
Form name Changed Tested
INVOICE.FRX
PACKLIST.FRX
PICKLIST.FRX
PLIST.FRX
ORDER.FRX
PO.FRX
Label name
LABEL.LBX
After making changes to your user defined forms ALWAYS TEST YOUR FORMS
using the ProBooks Model client before using them with your live data.
|
2-48 Report Writer |
Examples
Expressions Used In Form INVOICE
|
Report Writer 2-49 |
Invoice information for previously saved invoices is contained in two files,
the invoice header file &ARYINVOI and the transactions file &ARYTRANS.
When creating new invoices, the invoice information is stored in temporary
files with different names.
In order to be able to use the same INVOICE
form when printing an invoice from different parts of the program (while
entering an invoice, while posting invoices, from saved invoices) it is
necessary to use a special file pointer m-> or m. for fields from the header
file, and NO file pointer for fields from the detail file.
Similar rules
apply to forms which print information for QUOTES, ORDERS, and POs.
If you use the Expression Builder to create expressions from the invoice
header file ARYINVOI, it will create an expression with the file pointer
aryinvoi->
You must manually change the file pointer from:
aryinvoi->
to:
m->
or m.
You must manually change the file pointer for expressions from the
detail file from:
arytrans->
to:
m-> or m.
Header Lines
Header lines are printed at the beginning of each page, before detail lines.
Header fields for posted invoices are contained in the invoice header file &ARYINVOI.
Header fields for invoices that havent yet been posted are contained in the invoice temporary file. This might be &AINTEMP or &AINVOICE.
Use the m. file pointer for all header fields.
|
2-50 Report Writer |
Credit Memo
iif(m.total,*Credit Memo*, )
Print *Credit Memo* on the Invoice if the total of the invoice is less than 0.
Invoice number
m.invno
Invoice date
m.invdate
Invoice page number
_pageno
the Visual FoxPro page number variable
Bill to name
m.company
Bill to address
m.address1
Bill to address 2
iif(empty(m.address2),m.cityst,m.address2)
If there is not a 2nd address, print the city, state, zip, otherwise print
the 2nd address.
Bill to City, State Zip
iif(empty(m.address2), ,m.cityst)
If there is not a 2nd address, print nothing otherwise print the city,
state, zip
Ship to company
m.scompany
Ship to address
m.saddress1
Ship to address2
m.saddress2
Ship to City, State Zip
m.scityst
BillToID
iif(m.billcustno<>custno,BillToID:, )
If theres a separate Bill To Customer number, print the BillToID heading
Billing Customer
iif(m.billcustnocustno,m.billcustno, )
If theres a separate Bill To Customer, print the BillTo customer code
Customer number
m.custno
Purchase order
m.ponum
|
Report Writer 2-51 |
P.O. Date
m.podate
Our order number
m.ordnum
Salesman code
m.salesmn
The Via field from
the invoice header
left(m.via_fob,15)
The FOB field from
the invoice header
right(m.via_fob,15)
Duedate
m.duedate
Invoice Terms
m.iterms
Detail Lines
Header fields for posted invoices are contained in the invoice/inventory transactions file &ARYTRANS. A detail line is printed for each record with this invoice and customer number.
Header fields for invoices that havent yet been posted are contained in the invoice temporary file. This might be &AINTEMP or &AINVOICE.
Use NO file pointer for all detail fields.
If you use the expression builder to create expressions, it will create
an expression with the file pointer arytrans->
example:
arytrans->qtyord
You
must manually remove the file pointer for expressions from the detail file
from:
arytrans->qtyord
to:
qtyord
Itemno
iif(item(),itemno(),)
|
2-52 Report Writer |
If this is an Item line, print the item number, otherwise print nothing.
Description
iif(item(),descrip(),comtext())
or
iif(right(itemno,3)$REMCOMAMT , left(itemno,15)+descrip+unit , descrip)
If this is a comment line, or an amount line from a Basic invoice the item number, description field, and unit field are used to store the 45 character description youre allowed to enter.
If this is an inventory item, print the description field.
Both expressions have the same effect. The first uses ProBooks form functions ITEM(), COMTEXT(), and DESCRIP() to simplify the expression.
Quantity Ordered
qtyord
Format: 999,999.99
Enter the number of 9s you want to be printed. Use
commas if desired.
[N]umeric [X]Blank if 0
Quantity Shipped
qtyshp
Format: 999,999.99
Enter the number of 9s you want to be printed. Use
commas if desired.
[N]umeric [X]Blank if 0
Quantity Backordered
qtyord - qtyshp
Format: 999,999.99
Enter the number of 9s you want to be printed. Use
commas if desired.
[N]umeric [X]Blank if 0
UnitPrice
unitpr
Format: 999,999.99
Enter the number of 9s you want to be printed. Use
commas if desired.
[N]umeric [X]Blank if 0
Extended Price
qtyshp * unitpr
Format: 999,999.99
Enter the number of 9s you want to be printed. Use
commas if desired.
[N]umeric [X]Blank if 0
Taxable
iif(taxed , Y , N)
|
Report Writer 2-53 |
If the line item was taxable print Y, otherwise print N.
Footer Lines
Footer lines are printed in the Page Footer bands, after all detail lines have been printed.
Footer fields for posted invoices are contained in the invoice header file &ARYINVOI.
Footer fields for invoices that havent yet been posted are contained in the invoice temporary file. This might be &AINTEMP or &AINVOICE.
Use the m. file pointer for all footer fields.
Subtotal
m.subtotal
Format: 999,999.99
Enter the number of 9s you want to be printed. Use
commas if desired.
[N]umeric [ ]Blank if 0
Taxable
m.taxable
Format: 999,999.99
Enter the number of 9s you want to be printed. Use
commas if desired.
[N]umeric [ ]Blank if 0
Shipping
m.shipping
Format: 999,999.99
Enter the number of 9s you want to be printed. Use
commas if desired.
[N]umeric [ ]Blank if 0
Tax
m.tax
Format: 999,999.99
Enter the number of 9s you want to be printed. Use
commas if desired.
[N]umeric [ ]Blank if 0
Invoice Total
m.total
Format: 999,999.99
Enter the number of 9s you want to be printed. Use
commas if desired.
[N]umeric [ ]Blank if 0
|
2-54 Report Writer |
Amount Paid
m.cashpaid
Format: 999,999.99
Enter the number of 9s you want to be printed. Use
commas if desired.
[N]umeric [ ]Blank if 0
Payment type code
m.cashtype
Balance due
m.total - m.cashpaid
Format: 999,999.99
Enter the number of 9s you want to be printed. Use
commas if desired.
[N]umeric [ ]Blank if 0
|
Report Writer 2-55 |
Trouble Shooting User Defined Report & Label Form Errors
BLACK OBJECTS in a report form
Sometimes a report form created in one version of Visual FoxPro Windows will display black objects when you modify, or run the report, in another version of Visual FoxPro Windows.
This can happen when you modify a report form created in the Visual FoxPro Standard edition, when running ProBooks using the Visual FoxPro Support Library (runtime).
To make these objects display properly:
The black objects should now appear normally.
Report Preview
Select [M]odify Form, then select the Report, Preview from the System menu at the top of the screen. If there is an error in the form, the error will normally appear when running Preview. Press any key to continue, and the Report Expression dialogue will appear with the expression which caused the error displayed. Correct the Expression (or delete it if you find it impossible to correct).
From the Report Expression dialogue select [E]xpression and the Expression Builder dialogue will appear. The [V]erify button will check the syntax of the expression and indicate whether or not it is valid. If the expression is not valid, it must be corrected or removed from the report form before the report can be run.
When using the Report Form designer in ProBooks, always select the Clear Environment option. The Save/Restore Environment option can result in errors when running reports in ProBooks because the same report form might be used to run reports from different files, or using different index keys or filters, resulting in an error when a report is run that is attempting to restore environment variables that are invalid for the report that is currently being run.
Some report forms used in ProBooks are designed to be run from multiple programs which may use different files. Some examples are INVOICE, PACKLIST, and PO.
These report forms must not use a file pointer in the detail lines of the report form, and generally use the M-> (memory) pointer for fields that appear in the Header and Footer areas of the report.
When modifying these forms, you must use the rules when adding new expressions.
For more information, see the section Forms Which Have Special Requirements in this chapter.
Syntax Error generally indicates a report expression has been incorrectly entered. Use Report, Preview to identify the field containing the expression which results in the error, and correct or delete the expression.
Operator/Operand/Type Mismatch
|
2-56 Report Writer |
Operator/Operand/Type Mismatch generally indicates a report expression has been incorrectly entered. Use Report, Preview to identify the field containing the expression which results in the error, and correct or delete the expression.
This can be the result of the Save/Restore Environment option in the Report, Layout dialogue. Select Report, Layout from the System menu at the top of the screen, then select the Environment, Clear option, and try running the report again.
Variable Not Found can indicate the program is trying to set the order to an index tag/key which does not exist for the specified file.
This error can also indicate a report expression has been incorrectly entered. Use Report, Preview to identify the field containing the expression which results in the error, and correct or delete the expression.
Reporting Using Other Programs
You can also export data from your data files to several formats including ASCII delimited, SDF, 123 .WKS. and Excel .XLS formats.
If youve added optional Memo Fields to your Customer, Vendor, Inventory, Employee, Job and Asset files, you can create a Visual FoxPro memo fields are not compatible with standard .DBF files) so you can use your data from these files in other programs.
Many programs can use .DBF files directly (Excel), or can import them into their own format (123). The report writer can also be used to create new .DBF files using the filters specified in the report setup screen.
Advanced Usage
The Visual FoxPro report form designer can utilize the entire Visual FoxPro language. A complete explanation of the entire Visual FoxPro language is beyond the scope of this manual.
Many reference books on the Visual FoxPro language are available which provide a complete listing of all of the commands and functions available in the Visual FoxPro language.
A complete reference is also provided with the Visual FoxPro development package. The development version of Visual FoxPro also includes the RQBE or Query By Example facility which is not available in the run-time version of Visual FoxPro that comes with ProBooks.
The Visual FoxPro development version also includes capabilities for creating charts from your ProBooks data.
Visual FoxPro Development System
With Visual FoxPro you can manipulate your ProBooks files in practically any way imaginable.
In addition, the development system allows you to write, compile and run Visual FoxPro programs. With Visual FoxPro you could create add on modules providing customized capabilities to your ProBooks system. Visual FoxPro is available at most software retailers.
|
Report Writer 2-57 |
Creating Reports Using Other Programs
Because ProBooks uses the popular .DBF file format its possible to use a wide variety of popular programs to create reports using data from files you create and maintain with ProBooks.
Whenever you use another program to work with data from ProBooks, please
use COPIES of your ProBooks data files and NOT YOUR ACTIVE FILES. Using
your other programs, you could make changes to the data files which would
render them unusable in ProBooks.
Report Writers
Many specialized report writers compatible with Visual FoxPro .DBF files are available. These include FoxFire, R & R Report Writer, Crystal Reports and numerous others.
Many popular spreadsheets can either import .DBF files or load them directly. If youre familiar with a particular spreadsheet, you can load a copy of files youre maintaining with ProBooks and manipulate the data and print various reports using commands you already know. Many spreadsheets also give you the ability to create graphs in many different styles using your .DBF data.
Data Base Managers
ProBooks .DBF data can be viewed using many other programs including MS Access, MS Excel and any program able to access data using ODBC.
Additional Information on Visual FoxPro
The ProBooks manual is not intended to provide a complete or thorough explanation
of the Visual FoxPro language.
For additional information and examples on
using the Visual FoxPro Report Form facility, and a more detailed explanation
of Visual FoxPro commands, functions, and operators, a reference on Visual
FoxPro is recommended.
Contact PC Accountant Customer Support for a current
listing of Visual FoxPro reference books and where they can be purchased.
|
2-58 Report Writer |