Getting Started Guide: Using Crystal Reports With Sage Peachtree
Getting Started Guide: Using Crystal Reports With Sage Peachtree
-i-
© 2004-2009 Automatic Data Processing, Inc. All rights reserved.
© 2009 iLumen, Inc. All rights reserved.
© 1994-2007 Inner Media, Inc. All rights reserved.
© 2005 Innovision Corporation. All rights reserved.
© 2001-2009 Iron Mountain. All rights reserved.
© 2002-2007 Macrovision Corporation. All rights reserved.
© 2009 Pervasive Software Inc. All Rights Reserved.
© 1994-2009 United Parcel Service of America, Inc. All rights reserved.
© 1995-2006 Wintertree Software Inc. All rights reserved.
© 2006 WinZip International LLC. All rights reserved.
© 2007 Xceed Software, Inc. All rights reserved.
- ii -
Table of Contents
- iii -
Getting Started Guide - Using Crystal Reports® with Sage Peachtree ®
Important: Consult your license agreement for information about the number of machines on which Crystal
Reports can be installed.
any user tries to refresh the data in a Crystal report using the Refresh button in the Navigation toolbar,
-1-
Getting Started Guide - Using Crystal Reports® with Sage Peachtree ®
the program will request a password. If the password entered does not match the password for the user with
Crystal Reports access, then the user will not be able to refresh the report data and thus potentially use dif-
ferent parameter values to filter the data that appears in the report.
l For more information about the Maintain Users window and setting up users, click the Help button in the win-
dow.
l For more information about refreshing report data in Crystal, look up “Refreshing data:report data” in the
Crystal Reports Online Help index.
Note: When you create custom reports or when you download new standard reports from the Peachtree
Web site, you'll need to copy them to your program subdirectories before you can work with them in Peach-
tree.
-2-
Getting Started Guide - Using Crystal Reports® with Sage Peachtree ®
Aged Receivables
This report shows a total of aged receivables by customer. It also includes the following information for each
customer taken from the Peachtree customer record:
l Customer ID
l Customer Name
l Contact
l Telephone (No. 1)
l Invoice/Credit Memo No.
l Aging Brackets
-3-
Getting Started Guide - Using Crystal Reports® with Sage Peachtree ®
Inventory Labels
These are labels you place on inventory items so that they can be stocked in the proper location at your storage
facility. The labels print 3 across x 10 down (30 per page) in the LL-30W laser label format available through the
Peachtree Business Checks & Forms catalog. Each label lists the following information:
l Item ID
l Item description
l Vendor ID
l Location
-4-
Getting Started Guide - Using Crystal Reports® with Sage Peachtree ®
l Telephone (No. 1)
l Vendor Balance
-5-
Getting Started Guide - Using Crystal Reports® with Sage Peachtree ®
Assembly Planning
This report displays details for a specified assembly, including the number of components needed, available,
and on hand for the assembly. This report is helpful if printed before beginning the production of an assembly
because it provides the status of the necessary components. The report includes the following fields:
l Item ID
l Description
l Quantity Needed
l Quantity on Hand
l Quantity Available
-6-
Getting Started Guide - Using Crystal Reports® with Sage Peachtree ®
l Reference
l Receipt Date
l Quantity
l Unit Cost
l Amount
Production Schedule
This report displays the assembly items on open sales orders, and is sorted by the Ship By Date. This report is
designed to help you meet shipping deadlines by showing which assembly items need to be manufactured, and
the order in which they need to be shipped. The report displays the following fields:
l Ship By Date
l Sales Order No
l Customer ID
l Customer Name
l Item ID
l Description
-7-
Getting Started Guide - Using Crystal Reports® with Sage Peachtree ®
5. Crystal Reports may display a series of Directory error messages. To continue, click OK in answer to each of
these.
6. If Crystal Reports displays Please give location of Info view or dictionary used to create this
report, click OK. The Choose Database File window appears. Select Crystalreports.udl (located in your new
Peachtree company data folder). For example, select \PROGRAM FILES\SAGE\PEA-
CHTREE\COMPANY\<COMPANY>\CRYSTALREPORTS.UDL.
7. Crystal Reports may identify data definition changes associated with your report design and ask if you want
to update your report. For example, if your report lists employee names, you may receive the message,
The database file "Employee" has changed. Proceeding to fix up the report. Click OK to each
of these data definition messages.
8. Repeat steps 5 through 7 until you get a message that the database is now up to date.
9. Click OK and the desired report appears in Crystal Reports.
10. Save the updated report.
11. Repeat steps 4 through 10 for each of your customized reports. Once you have updated your reports, they
will open normally from Peachtree and Crystal Reports.
Note: You will need access to the Peachtree company data from Crystal Reports to perform the steps listed
above. If limited access has been set up for accessing company data from Crystal Reports through Maintain
Users, only the person with access to the company data from Crystal Reports can perform these steps.
-8-
Getting Started Guide - Using Crystal Reports® with Sage Peachtree ®
Note: If you turn off Save Data with Report and then save a standard report, when you open it again
either in Peachtree or in Crystal Reports, the report will open in design rather than preview mode. Set the
option according to whether you want to see the report each time in preview or design mode.
With the Save Data with Report option turned on, you can preview a Crystal report the same way you do
other Peachtree reports.
Do one of the following:
l click the name of a Crystal report in the Select a Report or Form window, and then click the Display button.
l double-click the report name with the left mouse button.
The report will appear on the Preview tab of the Crystal Reports window.
For more information on using the Crystal Reports Preview tab, look up “Preview Tab” in Crystal Reports
Online Help.
-9-
Getting Started Guide - Using Crystal Reports® with Sage Peachtree ®
Data Files
List of Data (.DAT) Files Available in Peachtree for Crystal Reports, OLEDB,
and ODBC
The following is a list of all data (.DAT) files that are included in Peachtree This information is intended to assist
those who design reports for Peachtree using Crystal Reports.
To see the field information included in the .DAT files listed below, look up ".DAT files; listed" in the Peachtree
Help index. From that topic, you can click on the name of a .DAT file to see the field information that is included
in that file.
Note: The list below does not constitute a list of each file in your Peachtree company data directory. It con-
tains only the data tables that can be accessed via crystalreports.udl, which were specifically designed for
using Crystal Reports with Peachtree.
- 10 -
Getting Started Guide - Using Crystal Reports® with Sage Peachtree ®
Note: Not all Peachtree database information is available or presented in Peachtree field tables. For exam-
ple, Employee default information (Payroll setup), action items, and Peachtree company user setup (user IDs
and passwords) cannot be added to your Crystal reports. You may be able to access data fields that would not
- 11 -
Getting Started Guide - Using Crystal Reports® with Sage Peachtree ®
be pertinent for your reports (for example, fields used in internal Peachtree functions).
Also, some Peachtree fields (which cannot be described in Peachtree data [.DAT] files) require custom for-
mulas in order to extract data for reports.
Note: Reports containing these custom formulas must reside in the same directory as your Peachtree com-
pany files. This is so the reports can extract data directly from the company information contained in the files.
- 12 -
Getting Started Guide - Using Crystal Reports® with Sage Peachtree ®
GetPeachCustomFieldHeadingv2 ( Filename, 1, 1)
This returns the second customer custom field heading. Follow the same format for the three remaining for-
mulas.
Tip: To view an example of this function, examine the Customer Detail List or the Vendor Detail List which
are Crystal Reports included with Peachtree.
Quantity on Hand
GetPeachItemQtyOnHandv2 ({Company.CompanySpecial1a}, {Com-
pany.CompanySpecial1b}, {Company.CompanySpecial1c}, {Com-
pany.CompanySpecial1d}, {LineItem.ItemRecordNumber})
This function is similar to GetPeachItemBegBal except that it returns the quantity on hand at the end of the cur-
rent accounting period. It is the same number shown in Maintain Inventory Items in the Qty on Hand field.
The function requires that you use the LineItem table.
Quantity on PO's
GetPeachItemQtyOnPOv2 ({Company.CompanySpecial1a}, {Company.CompanySpecial1b},
{Company.CompanySpecial1c}, {Company.CompanySpecial1d}, {LineI-
tem.ItemRecordNumber})
This function returns the quantity of the specified item on open purchase orders. It is the same number shown
in Maintain Inventory Items in the Qty on PO's field. The function requires that you use the LineItem table.
Quantity on SO's
GetPeachItemQtyOnSOv2 ({Company.CompanySpecial1a}, {Company.CompanySpecial1b},
{Company.CompanySpecial1c}, {Company.CompanySpecial1d}, {LineI-
tem.ItemRecordNumber})
This function returns the quantity of the specified item on open sales orders. It is the same number shown in
Maintain Inventory Items in the Qty on SO's field. The function requires that you use the LineItem table.
- 13 -
Getting Started Guide - Using Crystal Reports® with Sage Peachtree ®
Last Cost
GetPeachItemLastCostv2 ({Company.CompanySpecial1a}, {Com-
pany.CompanySpecial1b}, {Company.CompanySpecial1c}, {Com-
pany.CompanySpecial1d}, {LineItem.ItemRecordNumber})
This function returns the same number shown in Maintain Inventory Items in the Last Unit Cost field. The
function requires a LineItem record. The function requires that you use the LineItem table.
- 14 -
Getting Started Guide - Using Crystal Reports® with Sage Peachtree ®
Account ID
GetPeachGLAccountIDv2
This function returns the general ledger account ID for the account with the account record number specified in
the function.
Account Description
GetPeachGLAccountIDv2
This function returns the general ledger account description for the account with the account record number
specified in the function.
Note: Users must be set up in Maintain Users with sole rights to Crystal Reports in order to access infor-
mation in the Audittr.DAT table.
Note: Users must be set up in Maintain Users with sole rights to Crystal Reports in order to access infor-
mation in the Audittr.DAT table.
l GetPeachCompanyNamev2 l GetPeachISRealTimePostv2
l GetPeachAddress1v2 l GetPeachCompanyTypev2
l GetPeachAddress2v2 l GetPeachEmailv2
l GetPeachCityv2 l GetPeachWebSitev2
l GetPeachStatev2 l GetPeachPhoneNumberv2
l GetPeachZIPv2 l GetPeachFAXNumberv2
l GetPeachCoutryv2 l GetPeachSEINv2
l GetPeachFEINv2 l GetPeachSUINv2
l GetPeachIsCashBasisv2
- 15 -
Getting Started Guide - Using Crystal Reports® with Sage Peachtree ®
Assembly Component
GetPeachBOMCompIDv2
This function returns the ID of a component used in an assembly based on the index specified in the function. In
this function, the numbered index of assembly components starts with zero. The function is displayed as fol-
lows:
GetPeachBOMCompIDv2 (Filename, {LineItem.ItemRecordNumber}, (Index 0..99) )
To return the desired component ID, you must replace "Index 0..99" with the appropriate number from 0-99.
For example, to return the first component in the assembly, the function should read
GetPeachBOMCompIDv2 (Filename, {LineItem.ItemRecordNumber}, 0 )
Use the index field in a similar manner for all BOM functions.
- 16 -
Getting Started Guide - Using Crystal Reports® with Sage Peachtree ®
- 17 -
Getting Started Guide - Using Crystal Reports® with Sage Peachtree ®
Unit/Measure Functions
All Unit/Measure functions are available only in Peachtree Premium Accounting for Distribution and Peachtree
Premium Accounting for Manufacturing.
Unit/Measure ID
GetPeachUMID
This function returns the Unit/Measure ID.
Unit/Measure Description
GetPeachUMDescription
This function returns the Unit/Measure Description.
- 18 -
Getting Started Guide - Using Crystal Reports® with Sage Peachtree ®
- 19 -
Getting Started Guide - Using Crystal Reports® with Sage Peachtree ®
6. In the File name box, enter “Price Tags.” (Crystal Reports will automatically add the needed .rpt exten-
sion.) Then select Save.
7. Close the report.
8. Go to File>Open and reopen the "Price Tags" report.
- 20 -
Getting Started Guide - Using Crystal Reports® with Sage Peachtree ®
8. Find the PriceLevel1Amount field; select it; and drag it into the Detail c section. Release the mouse but-
ton.
23. Next we want to insert an “Our Price” marker. Select the Insert Text Object button in the Insert
Tools toolbar. Notice the cursor appears as a plus sign.
24. Place the cursor at the far left side of the Details c section, hold the left mouse button down and drag the text
box to the right.
25. A text cursor appears at the right side of the object frame. Type in the following: “Our Price: $.”
26. Click outside the object frame, and then right-click it. From the pop-up menu select Format Text and select
the Font tab. Now make the font settings exactly as in steps 17 through 20. Click OK.
27. The text will probably appear a bit cut off at the bottom, so select the bottom frame handle (the small blue
square at the bottom of the frame), and drag it downward until you can see the text plainly.
28. Select the object frame, and move it up so that it more or less aligns with the PriceLevel1Amount field.
- 21 -
Getting Started Guide - Using Crystal Reports® with Sage Peachtree ®
Select the first “Our Price” object frame in the window. When the frame handles appear, click on the one
at the right side of the frame, and drag the frame to the right.
32. The “Our Price” field is rather far away from the dollar sign, so let’s close up the space. Select the Price-
Level1Amount field (in the illustration above, it would be the 79.99 value). When the object frame
appears, click the Align Left button in the Formatting toolbar at the top of the window.
This way, if the PriceLevel1Amount field has a large value in it (1,000.00 or more), the field will expand
to the right to accommodate the longer string of numbers. Our price tags are now complete.
33. Finally, from the File menu, select Save As, and save the report under the name “Price Tags.”
Review of Lesson 1
Let’s review some of the ideas we covered in Lesson 1:
l Since the standard Crystal reports that come with Peachtree are read-only, if you want to customize one of
the reports, you must first save it under a new filename.
l When you are working with data fields within a report, select them and right click to see a pop-up menu that
lets you format, delete, and copy fields, as well as perform other functions.
l To insert data fields, use the Field Explorer button in the Standard toolbar. To insert text fields, use the
Insert Text Object button in the Insert Tools toolbar.
l To move a field, first select it. The cursor will change into a cross with four arrowheads, indicating that you
can now manipulate the frame. To move the frame, simply drag and drop it.
l To expand or contract an object frame, select the frame; click the appropriate frame handle (at either right,
left, top, or bottom of the frame); and then drag and release the frame.
- 22 -
Getting Started Guide - Using Crystal Reports® with Sage Peachtree ®
.
8. When finished, select OK.
9. From the Standard Toolbar, select Field Explorer.
As you drag the fields, an object frame appears with the cursor shaped like an arrow atop stacked sheets of
paper marked with a plus. This indicates that you are inserting multiple fields at once.
5. Click the mouse button to insert the fields.
The fields appear in the same order in which you selected them in the Field Explorer window, namely, Con-
tact followed by Phone_Number
6. Next we want to place the company name at the top of the report. In the Field Explorer window, select For-
- 23 -
Getting Started Guide - Using Crystal Reports® with Sage Peachtree ®
This expands the list to display the list of custom Peachtree functions. The functions marked "v2" are Crystal
Report for Peachtree Version 9 custom functions. These functions will work with Crystal Reports 2008.
10. Double-click the function GetPeachCompanyNamev2 .
This is the function that will display the company name when placed in a formula and then applied to a
report.
11.
Select the Save and close button in the upper left corner of the Formula Editor.
The Company Name formula appears in the list of formulas in the Field Explorer window.
12. Drag the Company Name formula field to the Report Header section, and click to place it at the top of the sec-
tion, centering it within the section.
The field name aligns with the left side of the object frame.
- 24 -
Getting Started Guide - Using Crystal Reports® with Sage Peachtree ®
13. To center the field name so that the company name is centered on the printed or previewed report, select
the object frame and then select the Align Center button in the Formatting toolbar.
The formula name is now centered in the object frame, indicating that the formula will be centered on the
printed or previewed report.
The cursor now has double arrows, indicating that you can use it to move the divider between sections.
2. Hold down the left mouse button, and move the dividing line down perhaps a quarter of an inch, just enough
to insert the report title.
3. To insert the title, click the Insert Text Object button in the Insert Tools toolbar. The cursor turns
into a plus sign. Select the area below Company Name, hold the left mouse button down, and drag the
object frame to the right so that it is located below Company Name.
An object frame appears with the text cursor at the left side of the frame.
14. The title will be a bit off center, so select the object frame; drag it to center it; and then release the mouse
button.
15. Before you preview the report, you need to save it so that the formulas will work correctly. Go to
File>Save As and save the report with the name "Customer Contact List".
16. Now let’s preview the report to make sure it will look all right when printed. Do one of the following:
l From the View menu, select Print Preview.
l
From the Navigation Tools toolbar, select the Refresh button .
- 25 -
Getting Started Guide - Using Crystal Reports® with Sage Peachtree ®
A new tab, the Preview tab, appears. It shows how the report will look in printed form.
To make any desired changes such as changing the placement of fields for a more esthetically pleasing
effect, select the Design tab, and work with the fields there. As you learned in Lesson 1 , it’s possible to
change report elements on the Preview tab, but it’s generally easier working on the Design tab.
17. Finally, if you made any additional changes, from the File menu, select Save As, and save the report under
the name “Customer Contact List.”
Review of Lesson 2
Let’s review some of the ideas we covered in Lesson 2:
l Use the Database Expert window to connect with the file that contains the database tables you want in your
report. Use this window also to find and select the tables you want to include.
l To add fields to the table, use the Field Explorer to find and select the appropriate fields within the included
database tables. You can select multiple fields by highlighting the fields and then selecting the Ctrl button.
l To resize any of the sections in the report, just select the section divider, and holding down the left mouse but-
ton, drag the divider to the position you want.
l To center text within an object frame, use the Align Center button.
l To add text to the report, use the Insert Text Object button
l To change the font properties of a text object, select the object and right mouse click. From the pop-up menu,
select Format Text. Select the Font tab and make the appropriate changes.
l To preview a report before printing, select Print Preview from the File menu, or select the Refresh but-
ton in the Navigation Tools toolbar.
- 26 -
Getting Started Guide - Using Crystal Reports® with Sage Peachtree ®
6.
From the list of displayed tables, select JrnlRow. Then select the Right Arrow button .
JrnlRow appears in the Selected Tables box on the right.
7. Repeat step 7 for the JrnlHdr and Customers tables.
8. When finished, select Next.
The Link window appears, asking that you link the tables as needed.
9. Smart Linking attempts to link tables, but it may not always be the way you want it. In this case, we need to
clear the links and redo them.
10. Click Clear Links. Click Yes on the message asking if you want to remove all of the links.
11. Click Auto-Arrange. you'll probably want to make the window larger so you can see all the tables.
- 27 -
Getting Started Guide - Using Crystal Reports® with Sage Peachtree ®
12. Move JrnlRow to the right and move JrnlHdr and Customers so they are aligned vertically to the left of
JrnlRow.
13. Locate the PostOrder field in both the JrnlHdr and JrnlRow tables.
14. Using the mouse, click on the PostOrder field in the JrnlHdr table and while holding down the left mouse
button, move to the PostOrder field in the JrnlRow table. Release the mouse button.
Notice an arrow appears showing the link between the two tables.
15. Locate the CustomerRecordNumber field in the Customers and JrnlRow tables.
16. Using the mouse, click on the CustomerRecordNumber field in the Customers table and while holding
down the left mouse button, move to the CustomerRecordNumber field in the JrnlRow table. Release
the mouse button.
Notice an arrow appears showing the link between the two tables.
17. Click Next.
The Fields window appears.
18. In the Available Fields box, double-click the Customer table if it is not already open. Select the Cus-
- 28 -
Getting Started Guide - Using Crystal Reports® with Sage Peachtree ®
l GoodThruDate
l CustomerID
l QuoteIDForSales
l TransactionDate
l MainAmount
- 29 -
Getting Started Guide - Using Crystal Reports® with Sage Peachtree ®
27. We want to make sure that only quotes appear in our report. To do so, in the Available Fields box, double-
click the JrnlHdr table to open it. In this list of fields, select JrnlKey_Journal. This will tell Crystal that of all
the company information contained in the journal header file, we want only quote information to appear in
29. In the Available Fields box, double-click the JrnlRow table to open it. Select DistNumber, move it to the
Filter Fields box on the right side of the window. Make sure DistNumber is selected and select the is equal
to parameter from the first drop-down list. In the second drop-down list box, type 1 .
30. When finished, select Next.
The last window, the Template window, lets you overlay your report with a predesigned template that can
give your report a little additional flair. To familiarize yourself with the available templates, click each to pre-
view it. For our current report we want a plain format, so we'll stick with the No Template option.
31. Select Finish to see the completed Quotes Good Through report.
Notice that the finished report is displayed on the Preview tab to show what it will look like when printed. To
achieve the look seen above, you may need to make minor adjustments to the column headings.
32. Finally, select the Save button in the Standard toolbar, and save the report under the name “Quotes Good
Through List.”
33. Now test your memory. Insert the “Bellwether Garden Supply” company name on the report. If you don’t
remember how, consult the section of Lesson 2 where we discuss putting the company name on a report.
Save the report after adding the company name.
- 30 -
Getting Started Guide - Using Crystal Reports® with Sage Peachtree ®
Note: For more information on using parameter fields, look up "Parameter Fields" in the Crystal Reports
Online Help index.
Before beginning this exercise, open Bellwether Garden Supply in Peachtree and take note
of the year. If it is not 2007, please use that year in the lessons below (instead of 2007).
1. In the Standard toolbar, select the Field Explorer button.
2. When the Field Explorer window appears, select Parameter Fields and right click. From the pop-up menu,
select New.
3. In the Name field, enter “QuoteExpirationDate.”
4. In the Type field, use the drop-down list to select Date.
5. In the Value area of the grid, click where it says "Click here to add item" and enter "4/1/2007.
6. In the Value Options grid, change the setting for Prompt Text to "Enter desired Quote Good Through
Date".
7. Click OK.
- 31 -
Getting Started Guide - Using Crystal Reports® with Sage Peachtree ®
8. Next, we want to create a report selection formula that will filter the report to show quotes that fall before the
expiration date of April 1, 2007. From the Report menu, choose Selection Formulas and then Record.
The Record Selection Formula Editor appears.
9. Place the cursor after the text which reads {JrnlRow.DistNumber} = 1 . Type a space and then the word
"and." Press Enter to go to the next line.
10. In the panel on the left side of the window, double-click the Reports Fields icon to open it, and then double-
click the JrnlHdr.GoodThruDate field. It will appear as part of the selection formula. Type a greater than
(>) sign after it.
11. Select the Report Fields icon at the top of the left panel; then find and select (double-click) the ?Qu-
oteExpirationDate field. It should appear as part of the selection formula, as shown below.
12.
The formula is now complete, so select the Save and close button to close the Record
Selection Formula Editor.
13. When the Enter Values window appears, select 4/1/2007 from the Please enter a date drop-down list.
Click OK.
Since we have previously saved the report, a message may appear telling us that Crystal has detected a
change.
14. If necessary, select the Refresh Data option.
15.
Now select the Save button again to save the final version of our report.
- 32 -
Getting Started Guide - Using Crystal Reports® with Sage Peachtree ®
Review of Lesson 3
Let’s review some of the ideas we covered in Lesson 3:
l The Standard Report Creation Wizard lets you choose the database, database tables, and links that will oper-
ate in the report much as you would do if you had started with the Database Expert.
l The Fields window of the Wizard lets you add fields to the report and also select the order of those fields and
the column headings that will identify them in the report.
l The Grouping window lets you group all information in the report by one or more of the chosen fields.
l The Summaries window lets you chose a field or fields that will provide summary information in the report.
It also lets you chosen whether or not to include a grand total as part of the summary information.
l The Group Sorting window lets you sort groups based on summarized totals. This could be useful in the
case of reports reflecting information such as sales, where you will want to track sales reps or units doing the
best business.
l The Chart window lets you add a chart to the report, a visual representation of facts and figures in the
report.
l The Report Selection window lets you use one or more of the fields to filter the information that appears on
the report. This will limit the amount and nature of data you see.
l The Template window lets you overlay your report with a predesigned template, to give your report added
flair.
l If you want to further limit the data appearing on the report, adding one or more parameter fields to the
report will be the answer. Go to the Field Explorer, select Parameter Fields, right click, and select New.
- 33 -
Getting Started Guide - Using Crystal Reports® with Sage Peachtree ®
Note: there may be cases where you will need to select Pervasive PSQL OLE DB Provider in the Pro-
vider list before you can select Use Data Link File.
- 34 -
Getting Started Guide - Using Crystal Reports® with Sage Peachtree ®
These tables correspond to the Peachtree .DAT files. For example, the Company table contains all the com-
pany fields present in the COMPANY.DAT file, and the Employee table contains all the payroll fields present in
EMPLOYEE.DAT.
7. Select as many tables in the list as you want to include in the report. To select a table, either highlight it and
then click the Right Arrow button, or highlight and double-click the table.
8. If you want to view or make changes to the way the fields are linked between tables, select the Links tab.
All the tables you have chosen are displayed at the center of the window. If the Smart Linking feature is
turned on, the Expert automatically links all appropriate fields in the table. You can make new links or dis-
solve old ones as explained in Crystal Reports Online Help; select the Help button in the Database Expert
window.
9. When finished working in the Database Expert, select OK to close the window.
Now, with the fields in the tables properly linked, you can use the Field Explorer to insert database information
wherever you want it to appear in your report. For more information, look up "Field Explorer" in Crystal Reports
Online Help.
12 Quotes
- 35 -
Getting Started Guide - Using Crystal Reports® with Sage Peachtree ®
0 General Journal
1 Cash Receipts
2 Cash Disbursements
3 Sales
4 Purchases
5 Payroll
7 Inventory Adjust-
ments
8 Assemblies
10 Purchase Orders
11 Sales Orders
12 Quotes
Just as in the case of the RowNumber field above, you can set the value of the Journal field in either the Crys-
tal Record Selection Formula Editor or Select Expert. For example, if you set the value of the field to three, then
your custom report would draw on the Sales Journal for its information.
Null Dates
For example, suppose you wanted your report to filter out all sales order transactions that were lacking a ship-
by date. You would set up the report to include the ShipByDate field from the JrnlHdr table. Then, in either the
Record Selection Formula Editor or Select Expert, you would set the value of this field so that the report
returned only sales orders with non-null ship-by dates. In the Record Selection Formula Editor, the Ship-
ByDate field selection formula should look like this:
{JrnlHdr.ShipByDate}<>Date(0,0,0)
The result: The report would include a ship-by date from the original Peachtree transaction only if that date
were greater or less than 0 month/0 day/0 year—in other words, non-null.
- 36 -
Getting Started Guide - Using Crystal Reports® with Sage Peachtree ®
Null Strings
You can filter your reports so that transaction fields lacking information don’t show up on the report. Let’s say
you wanted to filter your report so that a reference number would show up only if the original Peachtree trans-
action had a non-null entry for the number. You could do this by selecting the Reference field in the JrnlHdr
table and setting it so that the report returned only non-null values for transaction reference numbers. In the
Record Selection Formula Editor, the Reference field selection formula should look this:
{JrnlHdr.Reference}<>””
The result: The report would include the reference number from the original Peachtree transaction only if it
was not blank.
In Summary
To filter null Peachtree transaction records out of your Crystal reports, use the following values in your report
selection formulas:
l Use 0 to filter out missing currency amounts.
l Use Date(0,0,0) to filter out missing dates.
l Use “” to filter out missing string values, such as transaction reference numbers.
- 37 -