ADP PC/Payroll for Windows
ReportSmith Level 2
HANDOUT MANUAL
February 2004
Copyright © 2004 ADP Canada
Canadian Automatic Data Processing Ltd.
Automatic Data Processing, Inc.
ADP PC/Payroll for Windows ReportSmith Level 2
©
Comment [IB-H1]:
2004 ADP Canada Co. All rights reserved.
The information contained herein constitutes proprietary and confidential information of
ADP Canada Co. It must not be copied, transmitted or distributed in any form or by any
means, electronic, mechanical or other, including photocopy, recording or any information
storage and retrieval system, without the express written permission of ADP Canada Co.
All rights reserved.
ADP provides this publication "as is" without warranty of any kind, either express or
implied, including, but not limited, the implied warranties of merchantability of fitness for a
particular purpose.
ADP is not responsible for any technical inaccuracies or typographical errors that may be
contained in this publication. Changes are periodically made to the information herein;
and such changes will be incorporated in new editions of this publication. ADP may make
improvements and/or changes in the products and/or the programs described in this
publication at any time without notice.
®
ADP is a registered trademark of ADP of North America, Inc.
HR/Profile™ is a trademark of Automatic Data Processing, Inc.
®
ReportSmith is a registered trademark of Strategic Reporting Systems, Inc.
®
eTime is a trademark of Automatic Data Processing, Inc.
Everybody loves payday™ is a trademark of Automatic Data Processing, Inc.
®
®
Microsoft , Windows , are registered trademarks of Microsoft Corporation in the United
States, and/or other countries.
®
Adobe , Acrobat and Adobe Acrobat logo are trademarks of Adobe Systems
Incorporated which may be registered in certain jurisdictions.
All other trademarks are the property of their respective owners.
Printed in Canada.
Make sure to replace the date with the
year of creation or publication (note the
year of creation is used for unpublished
works; a work may not be considered
published if it is subject to confidentiality
restrictions
For revised versions of the work (i.e.,
a major change or additional
functionality), the date in the notice
corresponds either to (1) the year of
creation or publication of the revision
or (2) the year in the copyright notice
of the original version of the work and
the years of all revised versions of the
work, including the new revision.
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
TABLE OF CONTENTS
3
Table of Contents
Introduction .................................................................................................................... 4
Using @DECODE ........................................................................................................... 7
Using @DECODE with SUM(DISTINCT) and Database Grouping............................. 21
Date-Time and String Functions ................................................................................. 37
Advanced Derived Field Functions............................................................................. 60
Creating Report Variables ........................................................................................... 75
Form and Label Reports .............................................................................................. 97
Report Scheduling ......................................................................................................108
Workshops...................................................................................................................116
Closing and Evaluation...............................................................................................127
Reference.....................................................................................................................130
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
INTRODUCTION
4
Introduction
Welcome
Welcome to ADP’s PC/Payroll for Windows ReportSmith Level 2 training course. We are
pleased that you have chosen our PC/Payroll for Windows software to process your
payroll and ReportSmith to handle your custom reporting needs. You will soon discover
how quickly you will be able to create complex reports using derived fields and report
variables along with scheduling those reports you need on a regular basis.
This manual contains resource material and source documents that you will use for
practice exercises and workshops throughout the day. Please feel free to make notes in
this manual, as it is yours to take back to your office.
When you begin creating complex reports at your office, the Reference section of this
manual, the on-line HELP system, and the ADP Sample Reports Guide available on the
Training and Documentation CD will also be useful and valuable resources.
ReportSmith® is a simple yet powerful tool for creating reports. It has been described as
simple to learn and easy to use. This course is designed to help you learn how to use
more advanced features of the ADP PC/Payroll for Windows v4.0 ReportSmith software.
Enjoy the course!
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
INTRODUCTION
5
Course Objectives
Upon completing this course, you will be able to:
•
Create complex columnar reports
•
Define and use complex derived fields using SQL Base functions
•
Create and use Report Variables
•
Generate Form and Label reports
•
Understand the process of setting up Report Scheduler
Agenda
Introduction
Using @DECODE
Using @DECODE with SUM(DISTINCT) and Database Grouping
Date-Time and String Functions
Advanced Derived Field Functions (Optional Module)
Creating Report Variables
Form and Label Reports
Report Scheduling
Workshops
Closing and Evaluations
ReportSmith® is a simple yet powerful tool for creating reports. It has been described as
simple to learn and easy to use. This course is designed to help you learn how to use
many of the more advanced functions of ADP PC/Payroll for Windows v4.2 ReportSmith
software.
Each topic has a Guided Practice formatted as a step/action table that we will complete
together as a group followed by Practice Exercises that you will complete independently.
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
FEBRUARY 2004
INTRODUCTION
Accessing ReportSmith
Follow the steps below to access ReportSmith.
Step
1
Action
Click StartÆProgramsÆADP SoftwareÆReportSmith
Result: The ReportSmith v4.2 login window below displays.
2
In the User Name field, type Administrator
3
In the Password field, type train
4
Click the OK button.
6
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
USING @DECODE
7
Using @DECODE
Module Objectives
Upon completing this module, you will be able to:
•
Define the purpose and uses of @DECODE
•
Define the rules of building an @DECODE formula
•
Generate reports including derived fields developed using @DECODE
Each topic has a Guided Practice formatted as a step/action table that we will complete
together as a group followed by Practice Exercises that you will complete independently.
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
USING @DECODE
8
Derived Fields Review
There will be times when the information you want to report does not exist as a field in
your database. Through derived fields, you may be able to calculate or derive it from a
field that already exists in the database.
To derive information from existing fields, you can apply a calculation to a field (e.g.,
salary = rate x 52 weeks), combine two or more fields (e.g., full_name = last name + first
name), or you can use an existing field to extract part of a field (e.g., mm = @month
(mm/dd/yy).
Before you can create a derived field, you must first select the fields required to create
the derived field. If you do not want the fields you used to create the derived field to print,
you select “Include Only for Use in Query” rather than “Include in Report”. Otherwise,
you must delete the extra fields after you generate your report.
Detailed explanations of each SQLBase function, along with examples of how they can
be applied in your report writing can be found in your Sample Reports Guide, Chapter 4,
Creating Your Own Fields. A number of SQL functions exist. They are: String, Numeric,
Date-Time, Finance, Other, and Summary.
Edit Derived Field Window
This workshop will focus primarily on string, summary and date-time
functions.
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
USING @DECODE
9
Overview of @DECODE
The SQL function @DECODE allows you to build an if /then statement. Simply put, you
ask the system to search a specific field and if it finds a certain value, it should substitute
a different value.
@DECODE can be used in many different ways. You may want to print deductions
extracted from the CheckView tables across the page rather than all in one column
printing down the page. We’ll learn about this use in the next chapter when we discuss
the use of SUM(DISTINCT) in conjunction with @DECODE.
Another use of @DECODE is to print a translation of a field rather than the actual value
of the field. ReportSmith offers a translation button on the toolbar for fields that store a
table of descriptions. HOMEDEPARTMENT is an example of a field that you built a
validation table for, when customising your PC/ Payroll for Windows software. Each
department built in the validation table stored both the department number and the
corresponding description. If the field you wish to translate is not one of these fields,
@DECODE can provide a similar result.
For example, the @DECODE string function enables you to tell the system to look at the
company code if it is XYZ then print Training Inc.
A string is one or more alphanumeric characters. This often reflects a code assigned to
the field you are looking at. In the above example, this would be the company code XYZ.
The return is what you want printed on the report. It may be a word you provide, such as
Training Inc. It may be information from the database, such as a dollar amount.
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
FEBRUARY 2004
USING @DECODE
10
Building an @DECODE Statement
The explanation provided in the software states “Returns a string given an expression.”
@DECODE(expr,s1,r1,s2,r2,…)
Components
Component
Expression
Description
expr
The field in the database you want the system to look at.
String
s1, s2…
The data you want to look for (a string of one or more
alphanumeric characters).
Return
r1, r2…
The data you want printed on the report if the string is found
(may be a string you provide or a field in the database such
as a dollar amount).
Example 1
On the chart below, enter the statement that would be used in the derived field to print
Training INC. when the company code is XYZ.
Derived
Field
Name
@DECODE
(expr,
s1,
r1,
s2,
TEST
Rules of @DECODE
You must follow a few crucial rules about how the statement is formatted:
1.
2.
3.
4.
5.
6.
Begin with @DECODE, followed by an open parenthesis.
The statement must end with a closing parenthesis.
The expression, string, and return data must be inside the parentheses.
String (character) data must be surrounded by single quotes.
A comma must be placed between fields.
The comma must be outside the single quotes.
r2)
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
FEBRUARY 2004
USING @DECODE
Guided Practice 1: Using @DECODE with 1 Return
Now let’s build the formula into a report.
Step
Action
1
On the menu bar, select File ⇒ New
2
Select Columnar and click OK
3
Click Add Table
4
Type the password train
5
Select the V_Employee table and click OK
6
Include the following fields:
COMPANY CODE
HOME DEPARTMENT
FILE NUMBER
NAME
7
Click OK
8
Click Derived Fields
9
In the Derived Field Name field, type Test and click Add
10
On the SQL function list, select String Functions
11
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
USING @DECODE
11
On the String Functions list, select @DECODE and click Insert
12
On the Data Fields list, highlight COMPANY CODE and click Insert
13
Type a comma to the right of the field name
14
Type 'XYZ',
15
Click Test
16
Click OK to close the Derived Field OK message
17
Click OK again
18
Click Done to generate the report
'Training Inc.'
Guided Practice 1 Results
12
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
FEBRUARY 2004
USING @DECODE
Saving Your Report
Step
Action
1
On the menu bar, select File ⇒ Save As or F12
2
Select the Training Folder
3
In the Report Name Field type the report name Prac1
Note: If desired, you can type a description to identify this report.
4
Click Save
5
Close the report
Report Name
Report Description
13
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
FEBRUARY 2004
USING @DECODE
14
Guided Practice 2: Using @DECODE with 2 Returns
Create a report that will list hourly and salaried employees as either eligible for receiving
overtime or ineligible.
On the chart below, enter the statement that would be used to create the derived field
indicating that salaried employees are ineligible from overtime and hourly employees
eligible.
Derived
Field
Name
@DECODE
(expr,
s1,
r1,
s2,
OT_
INDICATOR
Now let’s build the formula into a report.
Step
Action
1
On the menu bar, select File ⇒ New
2
Select Columnar and click OK
3
Click Add Table and click OK
4
Select the V_Employee table
5
Include the following fields:
NAME
RATETYPE
RATE1AMT
HOMEDEPARTMENT
6
Click OK
7
Click Derived Fields
8
In the Derived Field Name field, type OT_Indicator and click Add
9
On the SQL function list, select String Functions
10
On the String Functions list, select @DECODE and click Insert
11
On the Data Fields list, highlight RATETYPE and click Insert
r2)
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
12
Insert a comma to the right of the field name
13
Type
14
Type 'H','Eligible'
15
Click Test
16
Click OK to close the Derived Field OK message
17
Click OK again
18
Click Done to generate the report
19
Save your report as Prac2 in the Training Folder
20
Close the report
'S','Ineligible',
Guided Practice 2 Results
USING @DECODE
15
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
FEBRUARY 2004
USING @DECODE
16
Adding a Default Value to an @DECODE Statement
You can add a default to the @DECODE statement so that if the string is not found, the
default will be returned.
In the above example you may wish 'Unknown' to be your default value for those
employees who are neither salaried nor hourly.
The default value is added to the end of the formula to the left of the closed parenthesis.
As with other string values, it should be enclosed in single quotes and separated from the
previous value by a comma.
Sample @DECODE with a Default Value
@DECODE (REPORTS.V_EMPLOYEE.RATETYPE,'S','Ineligible','H','Eligible','Unknown')
Step
Action
Continue working with Prac2
1
On the menu bar, select Tools ⇒ Derived Fields
2
Click Edit
3
Click Clear and answer Yes to the question ‘Erase the current field
calculation formula?’
Note: It is recommended to clear the formula and begin again. It
frequently takes more time to edit fields correctly than to re-create
the field.
4
Type the formula and include the default statement ‘Unknown’
5
Click Test
6
Click OK to close the Derived Field OK message
7
Click OK again
8
Click Done to generate the report
9
Save your report
10
Close your report
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
FEBRUARY 2004
USING @DECODE
17
Guided Practice 3: Using @DECODE to Return a Field
Display the hourly rate for all employees in one column. Because the database does not
store the hourly rate for salaried employees, you need to create a field that will
•
•
Calculate and display an hourly equivalent for salaried employees
Display hourly rate for hourly employees
On the chart below, enter the statement that would be used to create a field of hourly
equivalents for hourly and salaried employees.
Derived
Field
Name
@DECODE
(expr,
s1,
r1,
s2,
HOURLY_
EQUIV
Step
Action
1
On the menu bar, select File ⇒ New
2
Select Columnar and click OK
3
Click Add Table and click OK
4
Select the V_Employee table
5
Include the following fields:
HOME DEPARTMENT
NAME
RATETYPE
RATE1AMT
STANDARDHOURS (query only)
6
Click OK
7
Click Derived Fields
8
In the Derived Field Name field, type Hourly_Equiv and click Add
9
On the SQL function list, select String Functions
10
On the String Functions list, select @DECODE and click Insert
11
On the Data Fields list, highlight RATETYPE and click Insert
r2)
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
Step
USING @DECODE
Action
12
Insert a comma to the right of the field name
13
Type 'H', into the formula
14
On the Data Fields list, select RATE1AMT and click Insert
15
Insert a comma to the right of the field name
16
Type 'S', into the formula
17
On the Data Fields list, select RATE1AMT and click Insert
18
On the Arithmetic list, select Division and click Insert
19
On the Data Fields list, select STANDARDHOURS and click Insert
20
Click Test
21
Click OK to close the Derived Field OK message
22
Click OK again
23
Click Done to generate the report
24
Save the report in the Training Folder as Prac3
25
Close the report after comparing your results to the sample below.
Guided Practice 3 Results
18
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
USING @DECODE
19
Practice Exercise 1
Generate a report identifying employees’ Benefits Coverage Indicator (stored in Status
Flag 1).
From the V_EMPLOYEE table, select the following fields:
•
NAME
•
FILE#
•
STATUSFLAG1
•
STATUS (query only)
Create a derived field named Benefits_Indicator that will display the following returns for
each string:
STATUS FLAG1
Return
S
Single
M
Married
F
Family
Include only active employees.
Sort the report by NAME.
Save the report as Exercise1 in the Training folder.
Compare your results to the answers on the next page.
CHALLENGE
Insert a default value of ‘UNKNOWN’ into the statement where the employee does not
have a value in STATUSFLAG1.
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
USING @DECODE
Practice Exercise 1 – Derived Fields
Derived Field called Benefits_Indicator
@DECODE(REPORTS.V_EMPLOYEE.STATUSFLAG1,'S','Single','M','Married','F','Family')
Derived Field called Benefits_Indicator with Default Statement
@DECODE(REPORTS.V_EMPLOYEE.STATUSFLAG1, 'S','Single','M','Married','F','Family','Unknown')
Exercise 1 Results (with Default Statement)
20
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
USING @DECODE
HANDOUT MANUAL
WITH SUM(DISTINCT) 21
Using @DECODE with SUM(DISTINCT) and
Database Grouping
Module Objectives
Upon completing this module, you will be able to:
•
Generate a report that includes derived fields created using
SUM(DISTINCT), @DECODE, and Database Grouping.
Purpose
This module teaches you how to display data across a report in columns rather than
rows.
Each topic has a Guided Practice we will complete together as a group followed by
Practice Exercises that you will complete independently.
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
USING @DECODE
HANDOUT MANUAL
WITH SUM(DISTINCT) 22
FEBRUARY 2004
Creating an Accumulator Report
On a columnar report, ReportSmith normally displays information on a page in rows.
This is not the most attractive way to provide information to the reader of the report.
In this section, we will concentrate on using derived fields, particularly the summary SQL
function Sum(Distinct) to allow you to provide information across the page, one column
for each accumulator.
Guided Practice 4:
Creating an Accumulator Report
Create a report that displays the year to date accumulator amounts for your Health
Insurance and Union deductions. They are stored as accumulator codes 09 and 10.
Display only active employees.
Step
Action
1
Create a new report using the V_YTD_ACCUMULATOR table.
2
Include the following fields:
SPECIALACCUMAMT
SPECIALACCUMCODE
NAME
HOMEDEPARTMENT
STATUS (query only)
3
Click OK
4
Click Selections
5
Click number 1 and select Add Selection Criteria
6
Click the field name and select STATUS
7
Click the line to the right of the word 'text' and type A
8
Click the 1 and select Insert New Selection Criteria after this
item
9
Click the field name and select SPECIALACCUMCODE.
10
Click the comparison operator (which currently displays Is Equal
To) and select Is In List
11
Click <values>
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
USING @DECODE
HANDOUT MANUAL
WITH SUM(DISTINCT) 23
12
Click Clear List to delete any values already listed including Blank
Text
13
Type 09 and click Add
14
Type 10 and click Add and then click OK
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
USING @DECODE
HANDOUT MANUAL
WITH SUM(DISTINCT) 24
15
Select Exclude Duplicate Rows
16
Click Sorting and insert NAME into the Sort List
17
Click Done to generate the report
18
Change the title of the report to Accum Report
19
Save this report as Prac4 in the Training folder
Guided Practice 4 Results
Though this report contains the information you requested, it displays the amounts for
each accumulator in a separate row for each employee.
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
USING @DECODE
HANDOUT MANUAL
WITH SUM(DISTINCT) 25
FEBRUARY 2004
Guided Practice 5: Accumulator Report Using @ Decode
This procedure will display each accumulator in a separate column. In our previous
example, we selected the Special Accumulators 09 and 10 to print and suppressed other
accumulators through the Selection Criteria. In this example, we will change our method
of inserting these fields on the report to “query only”. We will then print each column not
directly from the accumulator but through the derived field we create with @DECODE.
Use the chart below to build an @DECODE statement to search for the accumulator
codes 09 and 10, and return the accumulator amounts. You will need to create a
separate @DECODE Statement for each code.
Derived
Field
Name
@DECODE
(expr,
s1,
r1,
s2,
r2)
@DECODE
(expr,
s1,
r1,
s2,
r2)
ACCUM09
Derived
Field
Name
ACCUM10
Now let’s build this statement into the report. Continue using Prac4.
Step
Action
1
On the menu bar, select Tools ⇒ Tables.
2
Click Table Columns.
3
Highlight SPECIALACCUMCODE and SPECIALACCUMAMT and
click Include Only for Use in Query.
4
Click OK.
5
Click Derived Fields.
6
Type Accum09 in the Derived Field Name field and click Add.
7
Select @DECODE on the String Functions list and click Insert.
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
USING @DECODE
HANDOUT MANUAL
WITH SUM(DISTINCT) 26
FEBRUARY 2004
8
Insert SPECIALACCUMCODE in the formula
9
Type ,'09', in the formula
10
Insert SPECIALACCUMAMT in the formula
11
Type ,0 in the formula
Note: If you want zero (0) to display for employees who do not have
this accumulator, you add the default part of the statement.
12
Click Test
13
Click OK to close the Derived Field OK message
14
Click OK again
15
Repeat this process and create another derived field for Accum10
16
Click Selections
17
Click the number 2 and select Delete This Item
Note: The Selection Criteria created earlier to specify the codes to
display is no longer needed as they are now picked up through the
derived fields.
18
Click Done.
19
Change the name of the report to Accum Report with @DECODE
20
Save the report as Prac5.
Guided Practice 5 Results
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
USING @DECODE
HANDOUT MANUAL
WITH SUM(DISTINCT) 27
FEBRUARY 2004
Improving the Appearance through SUM(DISTINCT) and
Database Grouping
In the previous example, you will notice more than one line of data displays for each
employee. Look at James Curto on the sample report displayed on the previous page.
His first line represents the other accumulators; the second line the amount in Accum10,
with the third line representing his amount in Accum09. This is a result of how the
database stores and organizes information. You will use two functions to summarize this
data to one line:
•
SUM(DISTINCT) will summarize the numeric data and eliminate any duplicates. It is
the mathematical part of the function.
•
DATABASE GROUPING compresses or groups the data fields included in the report
(for example name, file #) and retrieves the summarized total Sum(Distinct) created
before running the report.
In the next step, we will apply these two functions to improve the appearance of this
report.
Guided Practice 6: Adding SUM(DISTINCT)
Step
Action
1
On the menu bar, select Tools ⇒ Derived Fields.
2
Highlight Accum09 and click Edit.
3
On the SQL Functions List select Summary Functions.
4
Scroll to the bottom of the list and highlight SUM(DISTINCT).
5
Click in the Derived Field formula box to position to cursor to the
left of @DECODE and click Insert.
Result: The cursor is positioned to the left of the closing
parenthesis. You need to enclose the @DECODE formula within
these parentheses. Deleting the closing parentheses and adding a
closing parenthesis at the end of the formula will accomplish this.
6
Press Delete to remove the closing parenthesis.
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
USING @DECODE
HANDOUT MANUAL
WITH SUM(DISTINCT) 28
FEBRUARY 2004
Remove this
parenthesis by
pressing
Delete.
Step
Action
7
Press End on your keyboard.
8
Type a closing parenthesis to fully enclose the @DECODE
statement within the Sum(DISTINCT).
Result: The statement includes two closing parenthesis: one set
encloses the @DECODE statement and the other encloses the
SUM(DISTINCT) statement.
Type a closing
parenthesis.
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
USING @DECODE
HANDOUT MANUAL
WITH SUM(DISTINCT) 29
FEBRUARY 2004
Step
Action
9
Click Test.
10
Click OK to close the Derived Field OK message. Click OK.
11
Edit the Accum10 field using the same procedure.
12
Click Done.
Result: The error message "Not a single value set function
displays"
The error indicates you summarized some of the data to return one line, but not all the
data. You told the system to summarize the derived fields or values, but not the
alphanumeric or other parts of the row. You cannot summarize columns that are
alphanumeric like NAME and HOMEDEPARTMENT.
Now you need to tell the system what to do with the other data displaying in that row on
the report. This is accomplished by using the function Database Grouping.
Step
13
Action
Click Fix Report
Result: You return to the Report Query window.
Note: Selecting Cancel will undo the last change you made to the
derived field. In other words, you will lose the derived field you are
working on.
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
USING @DECODE
HANDOUT MANUAL
WITH SUM(DISTINCT) 30
FEBRUARY 2004
Database Grouping
On the report you generated, through the application of SUM(DISTINCT), the system
knew to total the dollar amounts in the accumulator columns and return one row. It didn’t
know how to summarize the data in the name column and so returned extra lines (one for
each accumulator).
Example:
NAME
Curto, James
Curto, James
Curto, James
Accum 09
0.00
0.00
30.00
Accum 10
0.00
56.20
0.00
This is what caused the error “Not a Single Value Set Function”; the other columns on the
report are returning multiple rows (not a single value) and the derived fields are returning
a single row. Applying Database Grouping tells the system to group the other data that is
included on the report before it extracts it from the database.
Resulting Rule:
Whenever you use the function SUM(DISTINCT), or any Summary Function, you must
also use Database Grouping.
Guided Practice 7: Applying Database Grouping
Step
Action
1
Select Database Grouping.
2
Click on the checkbox Group Data before Loading into Report.
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
USING @DECODE
HANDOUT MANUAL
WITH SUM(DISTINCT) 31
FEBRUARY 2004
3
Click Done.
4
Change the title of the report to Accum Report Using @DECODE,
SUM(DISTINCT), and Database Grouping.
5
Save this report as Prac7.
Guided Practice 7 Results
Database Grouping Guidelines
Some fields are automatically included in database grouping. You must be aware of
which fields should be included in Database Grouping to ensure your report generates
successfully.
Guideline 1: Fields included in database grouping are:
• Fields included in the report.
• Query-only fields used for sorting.
• Derived fields which are not included in a summary function.
Guideline 2: Establish Selection Criteria in the Database Grouping window for any
derived fields using a summary function rather than the SELECTION CRITERIA window.
In the screen copy on the previous page, notice the Group Selection Criteria window.
When using Database Grouping, you must establish any selections for the derived fields
using a summary function on this window. In this case, you have no selections for your
derived fields.
To eliminate extra rows for any employees who might not have amounts in Accumulators
09 or 10, you would add two selection statements on the Database Groupings window.
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
USING @DECODE
HANDOUT MANUAL
WITH SUM(DISTINCT) 32
FEBRUARY 2004
Guided Practice 8: Selection Statements for Derived Fields
in the Database Grouping Window
Step
Action
1
Select Tools ⇒ Database Grouping
2
Change the include statement from ALL to ANY
3
Create the selection statement derived field ACCUM09 is greater
than number 0
4
Repeat step 3 for ACCUM10
5
Click Done
6
Save the report as Prac8
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
USING @DECODE
HANDOUT MANUAL
WITH SUM(DISTINCT) 33
Now let's apply some additional formatting changes to the report to improve the
appearance.
•
Sort and Group by HOMEDEPARTMENT.
•
Insert a header and footer for the HOMEDEPARTMENT group.
•
Insert the HOMEDEPARTMENT field into the group header.
•
Delete the HOMEDEPARTMENT column from the report.
•
Provide a sum of each accumulator by department and change the footer label to
'Department Totals'.
•
Align the accumulator totals.
•
Compare your report to the results below and save the report.
•
Close your report.
Guided Practice 8 Results
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
USING @DECODE
HANDOUT MANUAL
WITH SUM(DISTINCT) 34
@DECODE, SUM (DISTINCT), and Database Grouping
Checklist
Select the table.
Select fields to include in the report.
Are there any fields that should be included for use in the query only?
Include Selection Criteria statements.
Build the derived field
Insert @DECODE.
Complete the @DECODE statement.
Do you require a default value for employees who do not meet the criteria?
Derived
Field
Name
@DECODE
(expr,
s1,
r1,
s2,
Insert SUM (DISTINCT) at the beginning of the @DECODE statement.
Remove the SUM (DISTINCT) closing bracket.
Add an additional closing bracket at the very end of the derived field.
Test the derived field.
Turn on Database Grouping.
For any derived fields created using a summary function, enter the appropriate
Selection Criteria in the Database Grouping window.
Generate the report.
Save the report.
r2)
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
USING @DECODE
HANDOUT MANUAL
WITH SUM(DISTINCT) 35
Practice Exercise 2A
Create a deduction listing that displays deductions B (Bonds), U (Union) and H (Health
Insurance) in separate columns.
From the V_DEDUCTIONS table include the following fields:
NAME
DEDUCTION CODE (query only)
DEDUCTION AMOUNT (query only)
STATUS (query only)
HOMEDEPARTMENT
Include only active employees.
Create three derived fields, one for each deduction code. Call the derived fields BONDS,
UNION, and HEALTH respectively.
Change the title to Deduction Listing.
Sort the report by NAME within HOMEDEPARTMENT.
Arrange the columns in the following order: NAME, HOMEDEPARTMENT, BONDS,
UNION, HEALTH.
Compare your report to the results below.
Save the report as Exercise2A.
Exercise 2A Results
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
USING @DECODE
HANDOUT MANUAL
WITH SUM(DISTINCT) 36
Note About CHECKVIEW Tables
CHECKVIEW tables store every payment produced for an employee since your
CHECKVIEW download began. Employees who received more than one payment in a
pay period will have each payment identified by the CHECKVIEWCHK#. Each payment
records the CHECKVIEWPAYDATE as part of the record enabling you to isolate specific
payments produced on specific pay periods.
Practice Exercise 2B: Enhanced Data Access
Create a report listing deduction codes B (Bonds) and U (Union) in separate columns.
From the V_CHK_VW_DEDUCTION table include the following fields:
NAME
CHECKVIEWCHK#
CHECKVIEWDEDCODE (query only)
CHECKVIEWDEDAMT (query only)
CHECKVIEWPAYDATE
Create two derived fields, one for each deduction. Name the derived fields BONDS and
UNION respectively.
Include a selection statement for paydate 2/20/2004.
Include only active employees.
Sort the report by NAME.
Change the title to CHECKVIEW Deduction Listing.
Save the report as Exercise2B.
Exercise 2B Results
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
DATE-TIME AND
HANDOUT MANUAL
STRING FUNCTIONS 37
Date-Time and String Functions
Module Objectives
Upon completing this module, you will be able to:
•
Generate reports requiring the creation of derived fields using the following
string functions:
@LEFT
@RIGHT
@MID
@NULLVALUE
Concatenation
•
Generate reports requiring the creation of derived fields using the following
date-time functions:
@DAY
@MONTH
@YEARNO
@NOW
•
Save derived field formulas for use in other reports
•
Load saved derived fields into a report
Purpose
This module teaches you how to extract part of an existing field by creating derived fields
using date-time and string functions.
Each topic has a Guided Practice we will complete together as a group followed by
Practice Exercises that you will complete independently.
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
DATE-TIME AND
HANDOUT MANUAL
STRING FUNCTIONS 38
Derived Fields- @LEFT, @RIGHT, and @MID
Using String Functions to Extract Portions of Data
You have been using the string function @DECODE to create if/then statements within
derived fields. There are several additional string functions that allow you to extract parts
of fields for printing or sorting purposes. For example, @LEFT, @RIGHT, and @MID.
These string functions are used when you wish to extract a specific part of a series of
numbers or characters.
For example, the HOMEDEPARTMENT field can consist of up to 6 alphanumeric
characters. If a portion of this alphanumeric series, or string, has specific meaning and is
required for sorting or grouping purposes, you would create a derived field using either
@LEFT, @RIGHT or @MID, depending on which digits you wish to extract.
@LEFT
This string function allows you to retrieve digits starting at the left of the series or string.
You must indicate the number of digits to extract starting from the left of the string.
The format of @LEFT is as follows: @LEFT (string, number)
Where the string is the field you wish to extract from and the number is the specified
number of positions to extract.
@RIGHT
This string allows you to retrieve digits starting at the far right of the series or string. You
must indicate the number of digits to extract starting from the right of the string.
The format of @RIGHT is as follows: @RIGHT (string, number)
Where the string is the field you wish to extract from and the number is the specified
number of positions to extract.
@MID
This string allows you to retrieve digits in the middle of the series or string. You must
indicate the starting position and then the number of digits you wish to extract.
The format of @MID is as follows: @MID (string, number, number)
Where the string is the field you wish to extract from, the first number is the starting
position and the second number represents the specific number of positions to extract.
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
DATE-TIME AND
HANDOUT MANUAL
STRING FUNCTIONS 39
FEBRUARY 2004
Guided Practice 9: Using @LEFT
Create a report that sorts by branch code, which is the first two digits of the
HOMEDEPARTMENT field.
Step
Action
1
Create a columnar report using the V_Employee table and include
the following fields:
COMPANY CODE
HOME DEPARTMENT
FILE NUMBER
NAME
2
Click Derived Fields
3
In the Derived Field Name field, type BRANCH and click Add
4
On the String Functions list, select @LEFT and click Insert
5
On the Data Fields list, select HOMEDEPARTMENT and click
Insert
6
Move the cursor past the comma and type 2
7
Click Test
8
Click OK on the Derived Field OK message and click OK again
9
Click Done to generate the report
10
Save the report as Prac9 in the Training folder
11
Close the report
Guided Practice 9 Results
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
DATE-TIME AND
HANDOUT MANUAL
STRING FUNCTIONS 40
Practice Exercise 3
Create a list of employees sorted and grouped by postal area, which is the first 3 digits of
the employees' residential postal code.
Using the V_Employee table include the following fields:
NAME
FILE#
POSTAL CODE
STATUS (query only)
Include only active employees.
Create a derived field named Postal_Area that extracts the first 3 digits of the postal
code.
Sort and group the report by Postal_Area. Include a group header.
Change the title of the report to Employee List by Postal Area.
Save the report as Exercise3.
CHALLENGE
Include a Selection Criteria so that the report only displays employees that live in the
postal area beginning with L.
(HINT: use the comparison operator "Is Patterned Like" and the formula 'L%')
Exercise 3 Results
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
DATE-TIME AND
HANDOUT MANUAL
STRING FUNCTIONS 41
Practice Exercise 4
Using HOMEDEPARTMENT 200253, answer the following questions:
The formula @LEFT(V_EMPLOYEE.HOMEDEPARTMENT,3) would extract:
a) 002
b) 253
c) 200
d) 352
The formula @MID(V_EMPLOYEE.HOMEDEPARTMENT,2,3) would extract:
a) 025
b) 25
c) 002
d) 20025
The formula @RIGHT(V_EMPLOYEE.HOMEDEPARTMENT,4) would extract:
a) 0025
b) 0253
c) 3520
d) 2002
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
DATE-TIME AND
HANDOUT MANUAL
STRING FUNCTIONS 42
FEBRUARY 2004
Derived Fields: Using @NULLVALUE when Adding
Numeric Data Fields
The database stores numeric fields without a value as blanks rather than zero. For
example, an employee who received regular earnings but was not paid overtime would
have a numeric value appear on a report in the Regular Earnings column but have blank
in the overtime column.
When using any numeric field in calculations, the system is unable to work with the blank
unless we substitute a value of 0. The @NULLVALUE is designed to perform this
function, substituting a value of zero where a blank is encountered. Illustrated as a
formula this function returns y if x is null (blank).
The formula appears as follows:
@NULLVALUE (x,y)
where
x = the field
y = the default value of 0
The @NULLVALUE function is used whenever two fields are added together and there is
a possibility that an employee may have a blank value.
Guided Practice 10A: Using @NULLVALUE
Create a report that lists employees' regular and vacation amounts paid.
1
Using the V_CHK_VW_EARNINGS table, create a columnar report
and include the following fields:
NAME
CHECKVIEWPAYDATE (query only)
CHECKVIEWEARNSCD
CHECKVIEWEARNAMT
CHECKVIEWREGERNING
2
Include the following Selection Criteria:
CHECKVIEWPAYDATE is equal to 02/06/2004
3
Click Done to generate the report
4
Save the report as Prac10A in the Training folder
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
DATE-TIME AND
HANDOUT MANUAL
STRING FUNCTIONS 43
FEBRUARY 2004
Guided Practice 10A Results
To demonstrate how ReportSmith uses numeric fields, we will build a report without using
@NULLVALUE and look at the result.
Guided Practice 10B: Creating a Derived Field to Combine
Two Numeric Fields
Create a derived field that totals the Regular and Vacation earnings for this pay period.
Step
Action
1
On the menu bar, select Tools ⇒ Derived Fields
2
In the Derived Field Name field type Total and click Add
3
On the Data Fields list select CHECKVIEWREGERNING and click
Insert
4
On the Arithmetic list, select (x+y) Addition and click Insert
5
On the Data Fields list select CHECKVIEWEARNSAMT and click
Insert
6
Click Test and click OK to the Derived Field OK Message
7
Click OK
8
Click Done to generate the report
9
Save the report as Prac10B
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
DATE-TIME AND
HANDOUT MANUAL
STRING FUNCTIONS 44
FEBRUARY 2004
Guided Practice 10B: Results
ReportSmith does not display totals for employees who do not have a value in each
column. You need to tell the system what to do if the column has a blank value. This is
accomplished by using the string function @NULLVALUE in the derived field formula.
Each field within the derived field requires the @NULLVALUE attached to it. This is so it
uses zero if either field is blank.
Guided Practice 10C: Applying @NULLVALUE
Step
Action
1
On the menu bar, select Tools ⇒ Derived Fields.
2
Highlight the Total field and click Edit
3
Click Clear and then click Yes to erase the current calculation
4
On the String Functions list, select @NULLVALUE and click Insert
5
On the Data Fields list, select CHECKVIEWREGERNING and click
Insert
6
Move the cursor past the comma and type O ('zero')
7
Move the cursor past the closing parenthesis
8
On the Arithmetic list, select (x+y) Addition and click Insert
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
DATE-TIME AND
HANDOUT MANUAL
STRING FUNCTIONS 45
FEBRUARY 2004
9
On the String Functions list, select @NULLVALUE and click Insert
10
On the Data Fields list, select CHECKVIEWEARNSAMT and click
Insert
11
Move the cursor past the comma and type 0 ('zero')
12
Click Test and click OK to the Derived Field OK message
13
Click OK and then Done to generate the report
14
Save the report as Prac10C in the Training folder
15
Compare your report to the results that follow and close the report
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
DATE-TIME AND
HANDOUT MANUAL
STRING FUNCTIONS 46
Guided Practice 10C Results
Notice the “Total” column on the report has been amended. Rather than displaying
blanks for employees who do not have an amount in the CheckView Earnings fields, it
displays the total, which may be only the one value the employee had.
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
DATE-TIME AND
HANDOUT MANUAL
STRING FUNCTIONS 47
FEBRUARY 2004
Combining Fields Using Concatenation
Another string operator that can improve the appearance of your reports is
Concatenation. This allows you to combine two or more fields to make a single field.
Combining address fields or area code with the phone number are examples of uses for
concatenation.
This function within derived fields is located in the Operator list in the string operator list.
Guided Practice 11: Combining Fields Using Concatenation
Add address fields to Prac9 using Concatenation.
Step
1
Action
Open Prac 9 and then click Tools ⇒ Tables Table Columns and
include the following fields for query only:
STREETLINE1
STREETLINE2
CITY
PROVINCE
POSTALCODE
2
Click Derived Fields
3
In the Derived Fields name field type Street and click Add
4
On the Data Fields list, select STREETLINE1 click Insert
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
DATE-TIME AND
HANDOUT MANUAL
STRING FUNCTIONS 48
FEBRUARY 2004
6
On the Arithmetic List, select String Operators
7
Highlight Concatenation and click Insert
8
Type ' ' (single quote, space, single quote)
Note: If you were to simply insert STREETLINE2 here, the two
fields would appear in the formula without any space between
them. To resolve this you need to tell the system to concatenate,
or glue, a space next to STREETLINE1. You do this by enclosing a
blank space within single quotes.
9
Highlight Concatenation and click Insert
10
On the Data Fields list select STREETLINE2 and click Insert
11
Click Test and Click OK on the Derived Field OK Message
12
Click OK and then click Done to generate the report
13
Save the report as Prac11
Guided Practice 11 Derived Field Formula
REPORTS.V_EMPLOYEE.STREETLINE1II' 'IISTREETLINE2
Note: By placing a space within single quotation marks, the formula inserts a space
between the two fields that will be joined together. Place commas, semicolons, or even a
double space in-between the single quotes and it will print in-between the two fields.
Guided Practice 11 Results
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
DATE-TIME AND
HANDOUT MANUAL
STRING FUNCTIONS 49
Practice Exercise 5
Continue working with Prac11.
Create one derived field named CityProvPost that joins the City Province and Postal
Code fields.
Between the City and Province fields, ensure that a comma and space is printed.
Between the Province and Postal Code fields, ensure that a double space is printed.
Change the Page Set Up to landscape and size the columns to fit the page.
Change the title to Employee Address Listing.
Save the report as Exercise5.
Results
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
DATE-TIME AND
HANDOUT MANUAL
STRING FUNCTIONS 50
Date-Time Functions
Date-time functions return information about a date field and return a date result. You
may wish to return information on portions of a date field or calculate time passed or time
into the future. Many of the Date-Time Functions act as formulas that extract portions of
the field out into a separate derived field.
For example,
• create a birthday listing by month.
• create a review date listing by month.
• determine an employee’s length of service.
@DATE
This function extracts the day value of a date field into the derived field.
The format of @DATE is as follows:
@DATE (date field) where the date field is the
field you wish to query.
@MONTH
This function extracts the month value of the date into the derived field.
The format of @MONTH is as follows:
@MONTH (date field) where the date field is the
field you wish to query.
@YEARNO
This function extracts the 4-digit year value of the date into the derived field.
The format of @YEARNO is as follows: @YEARNO (date field) where the date field is
the field you wish to query.
@YEAR
This function extracts the 2 digit year value relative to 1900 into the derived field.
The format of @YEAR is as follows:
@YEAR (date field) where the date field is the
field you wish to query.
@NOW
This function returns the system date set on the computer. It is commonly used to
calculate length of service or age of employees.
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
DATE-TIME AND
HANDOUT MANUAL
STRING FUNCTIONS 51
FEBRUARY 2004
Guided Practice 12: Using @MONTH
Using Prac9, create a derived field that returns the employees' month of hire.
Step
Action
1
Working with Prac9, add the HIREDATEACTUAL to the report
2
Click Derived Fields
3
Type Hire_Month in the Derived Field Name field and click Add
4
Click String Functions and select Date-Time functions
5
Select @MONTH and click Insert
6
On the Data Fields list, select HIREDATEACTUAL and click Insert
7
Click Test and click OK on the Derived Field OK Message
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
DATE-TIME AND
HANDOUT MANUAL
STRING FUNCTIONS 52
FEBRUARY 2004
8
Click OK and then click Done to generate the report
9
Change the page set up of the report to landscape
10
Sort the report by Hire_Month
11
Save the report as Prac12
Guided Practice 12 Results
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
DATE-TIME AND
HANDOUT MANUAL
STRING FUNCTIONS 53
FEBRUARY 2004
Guided Practice 13A: Calculated Field Using @NOW
Continue working with Prac12. Create a field that calculates the employees' length of
service.
Step
Action
1
On the menu bar, select Tools ⇒ Derived Fields
2
Type Length_of_Service in the Derived Fields Name field and
click Add
3
Click String Functions and select Date-Time functions
4
Select @NOW and click Insert
5
On the Arithmetic list, select (x-y) Subtraction and click Insert
6
On the Data Fields list, select HIREDATEACTUAL and click Insert
7
Click Test and click OK on the Derived Field OK Message
8
Click OK and then Done to generate the report
9
Save the report as Prac13A
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
DATE-TIME AND
HANDOUT MANUAL
STRING FUNCTIONS 54
FEBRUARY 2004
Guided Practice 13A Results
Look at the derived field column called Length_of_Service on the report. This field
displays the employee's service in days, as we used the entire date field.
To display the length of service in years rather than days the formula would have to be
modified. To convert to years, enclose the existing calculation in parenthesis and divide
by 365:
(@NOW-HIREDATEACTUAL)/365
Guided Practice 13B: Formatting the Derived Field
Step
Action
1
On the menu bar, select Tools ⇒ Derived Fields
2
Highlight Length_of_Service and click Edit
3
Type an open parenthesis at the beginning of the formula
4
Press End on your keyboard
5
Type a closing parenthesis at the end of the formula
6
From the Arithmetic List, select (x/y) Division and click Insert
7
Type 365
8
Click Test and click OK on the Derived Field OK Message
9
Click OK and then Done to generate the report
10
Save the report as Prac13B
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
DATE-TIME AND
HANDOUT MANUAL
STRING FUNCTIONS 55
FEBRUARY 2004
Guided Practice 13B Results
Notice the field now. It displays to several decimal places. To improve the appearance
of the column, format the field to one (1) decimal place.
Step
Action
1
Highlight the column by clicking on it once
2
On the menu bar, select Format ⇒ Field
3
In the Category section, select Number
4
In the Format field, type 0.0 to enter the new format
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
DATE-TIME AND
HANDOUT MANUAL
STRING FUNCTIONS 56
FEBRUARY 2004
5
Click OK
6
Save the report
Guided Practice 13B Results
Note: The @NOW string formula looks to the system date on your PC. Your calculated
Length of Service will not exactly match the results above.
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
DATE-TIME AND
HANDOUT MANUAL
STRING FUNCTIONS 57
FEBRUARY 2004
Saving and Loading Derived Fields
Derived fields that are created in a report can be saved for use in another report. This
feature saves the exact formula, including table and field names. To use the formula in
another report without modifying it, you must use the exact:
• Table name(s) and field name(s)
• Code entered in the original formula
Guided Practice 14A: Saving a Derived Field
Using Prac12, save the formula for Hire_Month.
Step
Action
1
On the menu bar, select Tools ⇒ Derived Fields
2
Highlight the Hire_Month field and click Edit
3
Click the Save button found at the bottom right corner of the Edit
Derived Field window.
4
In the Formula Name field, enter Month of Hire and click OK
5
Click OK again and then click Done to exit the Report Query
window
6
Save and close the report
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
DATE-TIME AND
HANDOUT MANUAL
STRING FUNCTIONS 58
FEBRUARY 2004
Loading a Derived Field to a Report
When loading a derived field to a report, ensure that the new report includes the same
tables and fields as the original formula. The formula will also load any codes that have
been saved in the formula (such as a deduction or earnings code) however, these codes
can be modified once the formula has been loaded.
In the next practice, we will add the Hire_Month derived field to the Roster report.
Guided Practice 14B: Loading a Derived Field
Step
Action
1
From the report folder ADP Samples, open the Roster report
2
In the report folder Training, save the report as Prac14
3
On the menu bar, select Tools ⇒ Derived Fields
4
Type Hire_Month in the Derived Field Name field and click Add
5
Click the Load button found on the bottom right corner of the Edit
Derived Field window.
6
Highlight the Month of Hire formula and click OK
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
DATE-TIME AND
HANDOUT MANUAL
STRING FUNCTIONS 59
FEBRUARY 2004
7
Click Test and click OK on the Derived Field OK Message
8
Click OK and then click Done to generate the report
9
Format the column widths to fit the report
10
Save the report as Prac14B
Guided Practice 14B Results
Exercise 6
Open Exercise5.
Save the formulas for Street and CityProvPost with appropriate formula names.
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
ADVANCED DERIVED
FIELD FUNCTIONS 60
Advanced Derived Field Functions
(Optional Module)
Module Objectives
Upon completing this module, you will be able to:
•
Create derived fields using @INT and @IF
•
Create derived fields using @ROUND
•
Create derived fields using MIN and MAX
Each topic has a Guided Practice we will complete together as a group.
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
ADVANCED DERIVED
FIELD FUNCTIONS 61
@INT and @IF Overview
SQLBase does not have a single function that performs a comparison. To perform a
comparison you need to use a combination of two derived fields: @INT and @IF.
An example of how this combination could be used is in a report that caps salaries at
$50,000.00. The report will look at the employees' salary and if the salary is less than
$50,000.00 it will display the actual annual salary. If the salary is greater than
$50,000.00, it will display $50,000.00.
@INT
@INT is a Numeric Function that returns the whole number portion of a number. It does
not round the number. In other words, it ignores anything to the right of the decimal.
For example:
@INT (10.7) would return the number 10.
@INT (0.80) would return the value 0.
@IF
@IF is an Other Function. Using this function, you can create a formula that tells the
system to look at a user-defined number and compare it to zero (0). If the number were
zero then the formula will return a user defined value. If the number were one (1), then
the formula will return a different user defined value.
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
ADVANCED DERIVED
FIELD FUNCTIONS 62
Scenario
In the Guided Practice that follows, you are going to create a report that caps employee
salaries at $50,000.00. If an employee earns more than $50,000.00, the report will print
$50,000.00; otherwise the report will print the employee's annual salary.
To compare the annual salary to $50,000.00, the @IF formula requires a qualifier of 1 or
0. In order to accomplish this, you need to divide the annual salary by $50,000.00. The
result will return a number that can be used as a qualifier in the @IF formula.
If the calculation returns a value less than 1, then the salary is less than $50,000.00. If
the calculation returns a value greater than or equal to 1 then the salary is $50,000.00 or
more.
There are three steps that need to be completed in order to achieve the report final
results:
1. The first formula is the qualifier. This is as an Arithmetic Formula that divides
ANNUALSALARY by 50,000.00
2. The second formula uses @INT to round the results of the qualifier to either 1 or 0.
3. The third formula is an @IF formula that defines whether the Annual Salary or
$50,000.00 is used. If the @INT result is 1 then the report will print 50,000 or if the
@INT result is 0 then the report will print ANNUALSALARY.
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
FEBRUARY 2004
ADVANCED DERIVED
FIELD FUNCTIONS 63
Guided Practice 15: Step 1 Creating the Qualifier
Step
Action
1
Using the V_Employee table, create a columnar report and include
the following fields:
NAME
ANNUALSALARY
2
Click Derived Fields
3
In the Derived Field Name field, type Salary_by_50000 and click
Add
4
On the Data Fields list, select ANNUALSALARY and click Insert
5
On the Arithmetic list, select (x/y) Division and click Insert
6
Type 50000
7
Click Test and click OK on the Derived Field OK message
8
Click OK to close the Edit Derived Field window
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
FEBRUARY 2004
ADVANCED DERIVED
FIELD FUNCTIONS 64
Step 2 Creating the Division Formula
Create a second derived field to apply @INT.
Step
Action
1
In the Derived Field Name field, type Integer and click Add
2
On the String Functions list, select Numeric Functions
3
Select @INT and click Insert
4
On the Data Fields list, select Derived Fields
5
Select Salary_by_50000 and click Insert
6
Click Test and click OK on the Derived Field OK Message
7
Click OK to close the Edit Derived Field window
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
FEBRUARY 2004
ADVANCED DERIVED
FIELD FUNCTIONS 65
Step 3 @IF Formula
Create a third derived field to apply @IF to define whether Annual Salary or 50,000.00 is
returned on the report.
Step
Action
1
In the Derived Field Name field type Cap and click Add
2
On the String Functions list, select Other Functions
3
Select @IF and click Insert
4
On the Data Fields list, select Derived Fields
5
Select Integer and click Insert
Note: In the @IF format, the Integer formula represents the number
portion of the formula
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
FEBRUARY 2004
6
ADVANCED DERIVED
FIELD FUNCTIONS 66
Move the cursor past the first comma and type 50000
Note: This is Value 1, where any value that is 1 or greater will print
50000.
7
Move the cursor past the last comma
8
On the Data Fields list, select ANNUALSALARY and click Insert
Note: This is Value 2, where any value that is zero will print the
record from the ANNUALSALARY field
9
Click Test and click OK on the Derived Field OK Message
10
Click OK and then Done to generate the report
11
Save the report as Prac15
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
ADVANCED DERIVED
FIELD FUNCTIONS 67
Guided Practice 15 Results
(Note: The columns on this report have been re-arranged in a different order than will
initially generate when the report is created.)
Notice that where the ANNUALSALARY is less than 50,000.00, the Cap column displays
the employee's annual salary and where the ANNUALSALARY is greater than 50,000.00
the Cap column displays the value 50,000.00.
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
ADVANCED DERIVED
FIELD FUNCTIONS 68
@ROUND Overview
The @ROUND function rounds a number to a defined decimal place.
@ROUND (x,n) where x is the field to be rounded
n is the number of decimal places
When n is a negative number the field will be rounded to the left of the decimal.
When n is a positive number the field will be rounded to the right of the decimal.
For example:
@ROUND (ANNUALSALARY, -3) would result in rounding to the thousand dollar based
on the third position
Therefore, a salary of 32103.5818 would be rounded to 32000.00
Complete the following using the salary 32103.5818
•
-1 __________________
•
-2 __________________
•
-3 ___32000.00________
•
1
__________________
•
2
__________________
•
3
__________________
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
FEBRUARY 2004
ADVANCED DERIVED
FIELD FUNCTIONS 69
Guided Practice 16
Continue working with Prac15. Using @ROUND, round the ANNUALSALARY field to
the nearest thousand.
Step
Action
1
On the menu bar, select Tools ⇒ Derived Fields
2
In the Derived Fields Name field type Round and click Add
3
On the String Functions list, select Numeric
4
Select @ROUND and click Insert
5
On the Data Fields list, select ANNUALSALARY and click Insert
6
Move the cursor past the comma and type –3
7
Click Test and click OK on the Derived Field OK Message
8
Click OK and then Done to generate the report
9
Save the report as Prac16
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
ADVANCED DERIVED
FIELD FUNCTIONS 70
Guided Practice 16 Results
(Note: The columns on this report have been re-arranged in a different order than will
initially generate when the report is created.)
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
FEBRUARY 2004
ADVANCED DERIVED
FIELD FUNCTIONS 71
MIN and MAX Overview
MIN and MAX are summary functions that display the minimum or maximum value for a
column. As with all summary functions you must use Database Groupings. The field that
is used in the formula is selected as a field for Query Only.
Guided Practice 17
Create a report that displays the minimum and maximum salary for each department.
Step
1
Action
Using the V_Employee table, create a new report and include:
HOMEDEPARTMENT
ANNUALSALARY (query only)
2
Sort the report by HOMEDEPARTMENT
3
Click Derived Fields and in the Derived Field Name field type
Minimum and click Add
4
Click Summary Functions and select MIN(col) and click Insert
5
On the Data Fields list, select ANNUALSALARY and click Insert
6
Click Test and click OK on the Derived Field OK Message and click
OK to close the Edit Derived Field window
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
FEBRUARY 2004
Step
ADVANCED DERIVED
FIELD FUNCTIONS 72
Action
7
In the Derived Field Name field type Maximum and click Add
8
Click Summary Functions and select MAX(col) and click Insert
9
On the Data Fields list, select ANNUALSALARY and click Insert
10
Click Test and click OK on the Derived Field OK Message and click
OK again to close the Edit Derived Field window
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
FEBRUARY 2004
ADVANCED DERIVED
FIELD FUNCTIONS 73
The next step is to ensure that Database Grouping has been turned on.
Step
Action
1
Click on Database Grouping
2
Check off Group data before loading into report
3
Click Done
4
Save the report as Prac17
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
Guided Practice 17 Results
ADVANCED DERIVED
FIELD FUNCTIONS 74
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
CREATING
HANDOUT MANUAL
REPORT VARIABLES 75
Creating Report Variables
Module Objectives
Upon completing this module, you will be able to create Report Variables applying basic
tasks:
•
Naming the Report Variable
•
Defining the Report Variable
•
Adding Selection Criteria to link the variable to the report
•
Changing the value of the variable in an open report
Each topic has a Guided Practice we will complete together as a group followed by
Practice Exercises that you will complete independently.
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
CREATING
HANDOUT MANUAL
REPORT VARIABLES 76
FEBRUARY 2004
Report Variable Overview
With Report Variables, you can customise a report so the information included is different
each time it is run. Report Variables appear as a dialog box when you open a report. You
can create a variable by selecting the Report Variable button in the Report Query window
before a report is generated or from the Tools, Report Variables menu after it is
generated.
To create a report variable that prompts the user for a value, you must:
• Name the Report Variable
• Define the type of Report Variable
• Add Selection Criteria to link the Report Variable to the report
Guided Practice 18A: Creating a Report Variable
Choose from a List
Using Prac9, add a Report Variable that prompts the user to specify which
HOMEDEPARTMENT they wish to view.
Step
Action
1
Open the Prac9 report
2
On the menu bar, select Tools ⇒ Report Variables
3
In the Name field, type Dept
4
In the Type field, select the down arrow to view the options
available
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
CREATING
HANDOUT MANUAL
REPORT VARIABLES 77
FEBRUARY 2004
Types of Report Variables
String
Accepts alpha and numeric characters as the response or allows you to
select from a list of values
Number
Accepts numerical values as the response
Date/Time
Requires a response on the type of variable selected (e.g. date requires a
date entry)
Note: The lower right corner of the Report Query Report Variables window changes
depending on the type of Report Variable selected.
5
On the Type list, select String
6
In the Title field, enter Home Department for Report
7
In the Prompt field, enter a prompt:
Please select the Home Department for the Report
8
In the Entry field, select the down arrow an view the entry types
Types of Report Variable Entries
Type In
The user types in a response
Choose from a List
The user selects a response from a predefined list. The
predefined list is built and maintained within the Report
Variable window.
Choose from a Table
Choices are loaded from a table in the database. When
building the Report Variable the table must be selected.
Choose between Two Values You can display the Report Variable as a choice in a
window. Users can choose between a YES value and a
NO value.
Step
9
Action
On the Entry list, select Choose from a list
Result: Notice that an Allowed Values field now displays beneath
the Entry type list. All allowed values for this Report Variable must
be entered and maintained in this field
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
CREATING
HANDOUT MANUAL
REPORT VARIABLES 78
FEBRUARY 2004
Step
Action
10
Enter 100100 in the box below the Allowed Values box
11
Click on the Add button to the right of the Allowed Values window
12
Enter 100200 in the box below the Allowed Values box
13
Click on the Add button to the right of the Allowed Values window
14
Continue adding the following HOMEDEPARTMENT numbers:
100300, 100400,100500
15
Click the Add button found to the left of the window
16
Click Done
Result: You will be prompted by the newly created Report Variable
for an entry selection.
Click here when
building the
predefined list of
allowed values
Click here when you
have completed
building the Report
Variable.
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
CREATING
HANDOUT MANUAL
REPORT VARIABLES 79
Once the Report Variable has been created, you will be prompted for an entry. In the
example you have just completed the following dialogue box will appear:
Step
Action
17
Select HOMEDEPARTMENT 100300
18
Click OK
19
Save the report as Prac18A
Guided Practice 18A Results
Notice that the report has not changed as a result of your response. This is because the
Report Variable has not yet been linked to a Selection Criteria statement.
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
CREATING
HANDOUT MANUAL
REPORT VARIABLES 80
FEBRUARY 2004
Selection Criteria for Report Variables
The Selection Criteria option was designed to limit the records the report seeks from the
database and prints on the report. Up until now, we have selected by entering text. By
substituting Report Variables for Text, we link the selection statement to the Report
Variable value entered, each time we run the report.
The Report Variable is the means to input the information you wish to report on. The
Selection Criteria forces the system to limit the information reported to that input. As you
will see when we apply the selection statement, one is dependent on the other.
To complete the Report Variable for the guided practice, we must now build Selection
Criteria statement.
Guided Practice 18 B: Applying Selection Criteria
Step
Action
1
On the menu bar, select Tools ⇒ Selections
2
Click number 1 and select Add selection criteria
3
Change the field to HOMEDEPARTMENT
4
In the Text field, select the down arrow and highlight Report
Variable
Result: The Report Variable that was earlier named Dept will
automatically appear because it is the only Report Variable
currently defined in the Report. If you had created several Report
Variables, you would then select the appropriate one from the list.
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
CREATING
HANDOUT MANUAL
REPORT VARIABLES 81
FEBRUARY 2004
5
Click Done
6
Change the title of the report to Employee List with Home
Department Report Variable
7
Save the report as Prac18B
Guided Practice 18B Results
Notice that the report is now limited to the HOMEDEPARTMENT value that you selected
from the Report Variable dialogue box earlier.
Modifying Report Variable Values
To modify the value of a Report Variable after running the report, you can simply close the
report and re-open it. Upon re-opening the report, the Report Variable dialogue box will
appear prompting the user to enter or select a value. Once the value is entered or
selected, the report will run, limited to the value of the user's response. (Note: The
Selection Criteria does not have to be re-built because it has been built and saved
previously. The Selection Criteria will now limit the report to any value entered or selected
in the dialogue box.)
Another method of changing the value of the Report Variable is to return to the Report
Variable screen. This method can be used if the report has already been run against a
response.
Step
Action
1
On the menu bar, select Tools ⇒ Report Variables
2
Highlight the Report Variable named Dept
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
CREATING
HANDOUT MANUAL
REPORT VARIABLES 82
FEBRUARY 2004
3
Click the Value button at the bottom of the window
Result: You now have the opportunity to select a different value.
Using this method, you can select the first value and then return to
this window to select another value with which to run the report
against without having to first exit the report.
4
Select HOMEDEPARTMENT 100100 from the dialogue box
5
Click OK and then select DONE
Results
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
CREATING
HANDOUT MANUAL
REPORT VARIABLES 83
Practice Exercise 7A
Create a report that lists employees and a deduction code that is selected through a
Report Variable.
From the V_Deduction table, select the following fields:
NAME
FILE#
HOMEDEPARTMENT
DEDUCTIONCODE
DEDUCTIONAMOUNT
STATUS (query only)
Include only active employees.
Create a Report Variable that requires users to select a deduction code from a list. Valid
responses are B (Bonds), U (Union), or H (Health).
Sort the report by NAME within HOMEDEPARTMENT.
Change the title of the report to Employee Deduction Listing.
Re-order the columns to the following sequence:
HOMEDEPARTMENT
FILE#
NAME
DEDUCTIONAMOUNT
DEDUCTIONCODE
Save the report as Exercise7a.
Exercise 7A Results
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
CREATING
HANDOUT MANUAL
REPORT VARIABLES 84
CHALLENGE
Change the report title to: Employee Deduction Listing for Code:
Insert the Report Variable into the Page Header, positioned at the end of the Report Title.
Do not include the field name.
Change from Data
Fields to Report
Variables
De-select to ensure that
the field name does not
appear on the report.
Delete the DEDUCTIONCODE field from the body of the report.
Results:
The Report Title will now change according to the code selected in the Report Variable
dialogue box.
Save this report as Prac7B.
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
CREATING
HANDOUT MANUAL
REPORT VARIABLES 85
FEBRUARY 2004
Guided Practice 19: Creating a Report Variable
Choose from a Table
This option enables you to reference values in the Report Variable from an existing
validation table built in PC Payroll for Windows. This type of entry value is useful because
you don’t have to create the list. You can use existing validation tables. For example,
HOMEDEPARTMENT values can be loaded from the V_DEPARTMENT validation table
and DEDUCTIONCODE values can be loaded from the V_DEDUCTIONS table.
Working with Prac18B, we will change the entry type to Choose from a Table.
Step
Action
1
Open Prac18B and select a department from the Report Variable
Dialogue box
2
On the menu bar, select Tools ⇒ Report Variables
3
In the Entry field, select Choose from a table
4
In the Select section, click on the Table button
5
Select the V_DEPARTMENT table
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
CREATING
HANDOUT MANUAL
REPORT VARIABLES 86
FEBRUARY 2004
Step
Action
6
Click OK
7
In the Select section, click the Field button
8
In the Display value from field field, select DESCRIPTION
Note: This will display the translated value held in the validation
table. In this case, it will display the name of the department.
9
In the Use value from field field, select DEPARTMENT
Note: This will allow the selection criteria to use the code from the
validation table when searching for a value with which to limit the
report.
10
Click OK
11
In the Report Variable section, click on the Save button
12
Click Done
Result: The Report Variable dialogue box will prompt the user for a
selection. In this example the dialogue box displays the department
descriptions.
13
Select Training and Development
14
Save the report as Prac19
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
CREATING
HANDOUT MANUAL
REPORT VARIABLES 87
Guided Practice 19 Results
Notice that the report has been limited to the Training and Development department, but it
still displays the actual value of the field (100400). You can use the Translate feature
within ReportSmith to display the HOMEDEPARTMENT description on the report.
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
CREATING
HANDOUT MANUAL
REPORT VARIABLES 88
Report Variable Using a Type-In Entry
Type-In, Multiple Values
You may wish to choose multiple values by typing in the different department numbers
that you want on the report.
If you wish to select multiple home departments in the previous example, the entry type
should be Type-In, and change the Selection Criteria statement to the conditional operator
Is In List.
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
CREATING
HANDOUT MANUAL
REPORT VARIABLES 89
The values should be entered as follows:
100100','100200 ','100300
Single quotes and commas must separate the values.
The first and last values will not have a single quote.
Result
The report now displays the 3 departments entered in the Report Variable dialogue box.
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
CREATING
HANDOUT MANUAL
REPORT VARIABLES 90
FEBRUARY 2004
Report Variable Using a Date Range
You may need a report that displays all the dates or data in a month. For this report, you
want the system to prompt the user for the first day of the month and the last day of the
month. This way you will ensure all pay dates within that time frame are included on your
report.
Guided Practice 20: Report Variable Using a Date Range
Create a monthly report that lists all of the employees' gross pay amounts. In this practice
will require two report variables, one for the first date of the month and another for the last
date of the month.
Step
Action
1
Create a new report from the V_CHK_VW_INFO table. Include the
following fields:
NAME
CHECKVIEWGROSSPAYA
CHECKVIEWPAYDATE
2
Click Report Variables
3
In the Name field, type StartDate
4
In the Type field, select Date
5
In the Title field, type Start Date for Report
6
In the Prompt field, type Enter the first date of the month
7
In the Format field, select mm-dd-yyyy
8
In the Entry field select Type-in
9
Click Add
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
CREATING
HANDOUT MANUAL
REPORT VARIABLES 91
Step
10
Action
Repeat the process and create a Report Variable for the last date
of the month as follows:
Name: EndDate
Type: Date
Title: End Date for Report
Prompt: Enter the last date of the month
Format: mm-dd-yyyy
Entry: Type-in
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
CREATING
HANDOUT MANUAL
REPORT VARIABLES 92
11
Click Selections
12
Create the Selection Criteria statement
Hint: Use the comparison operator is between
13
Click Done
14
Enter the following values when prompted:
Start Date: 02-06-2004
End Date: 02-20-2004
15
Save the report as Prac20
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
CREATING
HANDOUT MANUAL
REPORT VARIABLES 93
Guided Practice 20 Results
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
CREATING
HANDOUT MANUAL
REPORT VARIABLES 94
FEBRUARY 2004
Report Variable Using a Derived Field
Report Variables can be created to reference either data fields or derived fields. For
example, you may wish to create a report that allows the user to report on one month at a
time. The month is created through a derived field that extracts a part of a date field.
Each time you run the report, you enter a different month you wish to report on.
Guided Practice 21: Report Variable Using a Derived Field
Using Prac12, create a Report Variable that prompts the user to enter the month of hire
that he/she wishes to view.
Step
Action
1
Open Prac12
2
On the menu bar, select Tools ⇒ Report Variables
3
Create a Report Variable with the following entries:
Name: Month
Type: String
Title: Hire Month
Prompt: Enter the month you wish to report on
For January enter 01, for February enter 02 etc...
Entry: Type-in
When completed, click on Add and then Done
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
CREATING
HANDOUT MANUAL
REPORT VARIABLES 95
FEBRUARY 2004
4
When prompted, enter the value 08 and click OK
7
Click Tools ⇒ Selections
6
Create a Selection Criteria statement to link the Report Variable to
the report
Note: In this practice the Selection Criteria statement should
reference Derived Field instead of Data Field.
This report contains two derived fields, ensure that the correct
derived field is selected.
7
Click Done
8
Save the report as Prac21
Guided Practice 21 Results
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
CREATING
HANDOUT MANUAL
REPORT VARIABLES 96
Practice Exercise 8
Complete this exercise using Prac12.
Create a Report Variable that prompts the user to enter a branch. The entry type should
be Type-In.
Change the title of the report to Employee Hire Dates by Branch.
Test your Report Variable by running the report for Branch 10.
Save as Exercise8.
Exercise 8 Results
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
FORM AND
LABEL REPORTS 97
Form and Label Reports
Module Objectives
Upon completion of this module, you will be able to:
•
Generate and format a form report
•
Generate and format a label report
Each topic has a Guided Practice we will complete together as a group followed by a
Practice Exercise that you will complete independently.
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
FORM AND
LABEL REPORTS 98
Report Type Review
Columnar Report
This type of report displays data in columns across the page and rows down the page,
making it easy to scan a report for the information you need. It is the most commonly
used type of report.
Form Report
The form report format produces one page per record (employee) and displays data in a
free-format across the page. You use your mouse to drag and drop information to the
preferred position on the page. Form reports can be used to create employee statements
or information forms.
Labels
ReportSmith makes it easy for you to create different labels, including mailing labels, disk
labels, and file labels. ReportSmith can automatically generate all types of Avery label
styles.
Crosstab
A crosstab report displays data in summary or spreadsheet format. Similar reports can be
accomplished as effectively using a columnar format.
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
FEBRUARY 2004
FORM AND
LABEL REPORTS 99
Guided Practice 22A: Creating a Label Report
ReportSmith allows you to create labels by dragging and dropping data. After selecting
fields, you insert them into the label of your choice just as you insert data into the group
and page headers. They key to successful label reports is the use of the Align Toolbox
when formatting the report.
Create a label report to generate mailing labels for all active employees.
Step
Action
1
On the menu bar, select File ⇒ New
2
Click on Label Report
3
Click on Style
Result: ReportSmith offers a few system styles to choose from
4
Select Address
5
Click OK
6
Click OK again
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
FEBRUARY 2004
7
FORM AND
LABEL REPORTS 100
Select the V_EMPLOYEE table and include the following fields:
NAME
CITY (query only)
HOMEDEPARTMENT (query only)
PROVINCE (query only)
POSTALCODE (query only)
STATUS (query only)
STREETLINE1 (query only)
STREETLINE1 (query only)
8
Create a Derived Field named Street and load the corresponding
formula that was saved earlier during Exercise6
9
Create a Derived Field named CityProvPost and load the
corresponding formula that was saved earlier during Exercise6
10
Create a Selection Criteria statement so that the report includes
only Active employees
11
Sort the report by NAME within HOMEDEPARTMENT
12
Click Done
Result: A blank label report and the Insert Field window appears.
The label report does not list any of the fields included in the report. You must insert each
field from the Insert Field list to the label. You only need to insert the field to one of the
labels. The records will repeat and populate the other labels with the remaining employee
records.
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
Step
FORM AND
LABEL REPORTS 101
Action
13
In the Insert Field window, click NAME
14
Click Insert (Do not include the field name)
Note: You can also drag the NAME field over to the label.
15
Position your cursor in the top left label and click once to release
the NAME field.
16
Change the drop down list from Data Fields to Derived Fields
17
Insert the Street field below NAME (Do not include the field name)
18
Insert the CityProvPost field below Street (Do not include the field
name)
Note: At this point do not worry about alignment.
18
Save the report as Prac22A
At this point, the information is available on the label, but not lined up well for the most
attractive presentation.
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
FEBRUARY 2004
FORM AND
LABEL REPORTS 102
The Align Toolbox
You can align objects or fields according to how they are positioned with each other or to
the baseline. You can align columns or ensure equal space between fields you select.
Step
Action
1
On the menu bar, select Tools ⇒ Alignment
2
Note: To align objects or fields, you must first connect them as a
group.
Highlight NAME
3
Press CTRL and highlight Street and CityProvPost
Result: A blue box displays around each field identifying which
fields are selected for alignment.
The alignment toolbox is showing. Point, without clicking to the icon in the upper left
corner. The status bar on the bottom left corner of your window will display a description
of the icon you are pointing at.
4
Find the icon that Aligns the left edges of selected items
5
Click on this icon once
Result: Selected items are moved to the left of the label.
6
Find the icon that Aligns the edges bottom to top and click once
7
Save the report
8
Close the Align Toolbox
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
Guided Practice 22A Results
FORM AND
LABEL REPORTS 103
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
FEBRUARY 2004
FORM AND
LABEL REPORTS 104
Applying Label Styles
After creating the labels, you may realize they do not fit the labels you have in stock. In
addition to the system styles you have, ReportSmith is compatible with Avery labels. For
each label type, the dimensions are displayed. These dimensions can be changed if they
are not compatible with the labels you use.
Guided Practice 22B: Applying a Label Style
Continue working with Prac22 and apply a label style.
Step
Action
1
On the menu bar, select File ⇒ Page Set Up
2
Click Labels
3
In the Label Types and Dimensions field, click the down arrow
Result: A comprehensive list of label types display.
4
Highlight 5163 Address/Shipping and click OK
5
Save the report as Prac22B
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
Guided Practice 22B Results
FORM AND
LABEL REPORTS 105
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
FORM AND
LABEL REPORTS 106
Form Reports
The principles for creating a form report are similar to the label report. You will:
• Select Form as your report type
• Choose a Style
• Select a Table
• Select Fields
• Use the Align Toolbox to assist in formatting the form report.
Linking the Field Value and the Field Label
Be aware that when working with form reports, you can move a field without moving the
field label. These items can be moved independently of one another. To move the field
and the field label together when formatting the report:
• Highlight the field
• Hold the Shift key and highlight the field name
This will link both components together. You can then move the joined fields to the
appropriate area of the report.
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
FORM AND
LABEL REPORTS 107
Practice Exercise 9
Create an Emergency Contact form that will be distributed to employees to verify their
emergency contact information on file.
Create a new form report using the Bordered style.
From the V_EM_CONTACT table, select the following fields:
• NAME
• CONTACTNAME
• CONTACTPHONE#
• CONTACTAREACODE
• RELATIONSHIPCODE
Include the following Selection Criteria statement:
data field REPORTS.V_EM_CONTACT.CONTACTNAME Is not null.
Change the title of the report to Emergency Contact Information
Re-order the columns to the following sequence and rename as indicated:
NAME
CONTACTNAME
CONTACT NAME
RELATIONSHIPCODE
RELATIONSHIP
CONTACTAREACODE
CONTACT AREA CODE
CONTACTPHONE#
CONTACT PHONE#
Use the Align Toolbox to align the right edges of the field labels and to align edges
bottom to top. Use the Align Toolbox to align the left edges of the fields and to align
edges bottom to top.
Translate the RELATIONSHIPCODE.
Format the CONTACTPHONE# as 000-0000.
Save the report as Exercise9.
Exercise 9 Results
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
REPORT SCHEDULING
108
Report Scheduling
Module Objectives
Upon completing this module, you will be able to:
•
Identify the steps in activating the Report Scheduler
•
Identify the steps and screens required to Schedule a report
•
Identify the View Report Schedule Window
Each topic has a Demonstration that will be conducted by the instructor and a step and
action table can be used as a reference guide back at your offices.
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
REPORT SCHEDULING
109
Report Scheduler Overview
ReportSmith version 4.2 has a new feature called Report Scheduler that enables you to
schedule reports to run at specified times. From the Report Scheduler, you can:
•
Schedule Reports:
Once
one time on one day or many times on one day
Daily
on each day or several days during the week as well as several
times during each day
Weekly
every number of weeks (for example, every first week or every
third week) on one, all or multiple days of the week
Monthly
once each month, every day of the month, several days of each
week during the month
•
Specify start and end dates on which to stop running the report
•
Specify the frequency of the running of the report
•
Specify the number of repetitions or specific duration to run the report
•
Select the printer to which you want the Scheduler to send the report
The Report Scheduler
The ReportSmith Scheduler (RSScheduler.exe) must be open to run a report at the
scheduled time. When the ReportSmith Scheduler is open, an icon displays on the task
bar in the lower-right corner.
Report Scheduler
tray icon
Note: The icons in your task bar tray may appear different depending on the applications
that you are running on your PC. Ensure that the Report Scheduler tray icon appears
somewhere on your icon tray.
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
REPORT SCHEDULING
110
Activate the Report Scheduler
Before you begin to schedule reports, you must first activate the report scheduler. The
following steps are provided for you.
***Do not perform these actions in class. Your instructor will demonstrate the
scheduling of a report in class. ***
Step
Action
1
Right click Start button and select Explore
2
Select the following directory on drive C or the drive on your workstation
where ReportSmith is installed:
\Adp\RptSmith
3
Scroll down using the vertical scroll bars
4
Double-click the RSScheduler.exe file
Result: The ReportSmith Scheduler icon displays in the lower right corner
next to the task bar
Note: For easier access, you can also create a Desktop shortcut icon by
right clicking on the file and copying it, then pasting the shortcut to your
Desktop
5
Close Explorer
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
REPORT SCHEDULING
111
Schedule a Saved Report
In order to schedule a saved report, use the following steps:
***Do not perform these actions in class. Your instructor will demonstrate the
scheduling of a report in class. ***
Step
Action
1
On the menu bar, select File→Open
2
In the right pane, right click the report you wish to schedule
3
Select Schedule
Result: The schedule window displays for the selected report
4
Select the number of times you want the report to run
Note: Depending on the frequency that you choose, additional options may
have to be selected.
®
FEBRUARY 2004
Step
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
REPORT SCHEDULING
112
Action
5
Select the start date and start time
6
If you want Scheduler to run the report on a recurring basis, click the button
in the Repeat section and enter the frequency that you wish the report to
run.
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
REPORT SCHEDULING
Step
7
113
Action
Click on the Connection Info button
Note: The connection information is required for ReportSmith to connect to
the database.
8
Enter the Connection Info is as follows. Click Add and click OK
•
•
•
•
Login ID→(Use your PC/Payroll for Windows login ID)
Server Name→pay4win
Database Name→pay4win
Password→(Use your PC/Payroll for Windows password)
Use your PC/Payroll
for Windows Login ID
and Password.
9
Ensure that a printer is selected and click OK.
Note: If the correct printer is not displayed, use the drop down menu to view
a list of available printers. Click on the printer you wish this report to print
to and then click OK.
10
Click Close to close the catalogue
When the scheduled time comes, the RS_Runtime window displays. The report loads,
displays and then prints (depending on the report security).
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
REPORT SCHEDULING
114
Schedule Reports to Run After Hours
If you have scheduled reports to run after hours, you must leave the Report Scheduler
running as well as your PC. Turning off your PC will automatically turn off the Scheduler.
Consequently, your reports will not run at the scheduled times. You will receive a warning
message when you exit the Scheduler as a reminder.
View Report Schedule and User Schedule
ReportSmith enables you to view report schedules and user schedules in a format that is
similar to a print queue. If you double-click an item in the Report Schedule window or the
User Schedule window you can view schedule details for that particular report. In
addition, you have right mouse menu options in both windows including Edit, Delete and
Refresh. For example, if you want to cancel a report run that you have scheduled; you
select the item and then select Delete.
Report Schedule
The report schedule window gives you specific information about the status of the selected
report. To access the report schedule for a report, right click the report and select
Properties and then click the Schedule tab.
Note: Click Refresh to refresh the items that appear in the Schedule tab. Select an item
in the list and then click Schedule to view schedule details for each report run.
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
REPORT SCHEDULING
115
User Schedule
The User Schedule window gives you information about the reports scheduled by various
users. To access user schedules, click the View User’s Schedule icon in the catalogue.
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
WORKSHOPS
116
Workshops
Choose at least 1 of the 3 workshops listed for additional practice. The following table
summarises the reports included in this section.
Workshop
1
Report Title
Birth Date Report
Filename
Work1
Description
Skills
Displays the employees
month of birth and date
of birth
Create derived fields using
@MONTH and @DATE
Create a derived field using
@DECODE
Create a derived using
concatenation
Create a report variable
2
3
Sick Pay Liability
Report
Hours and
Earnings Listing
Work2
Work 3
Displays the
employees' amount of
sick hours allowed,
taken, balance and the
dollar value of the sick
balance.
Create a complex derived
field using @NULLVALUE
Displays the
employee's hours and
earnings from
Checkview tables for a
specific paydate
Create derived fields using
@DECODE,
SUM(DISTINCT) with
Database Grouping
Create derived fields using
@DECODE,
SUM(DISTINCT) with
Database Grouping
Create a report variable
Each workshop includes a set of instructions, a report sample, and a checklist to verify the
actions that must be taken to complete the report.
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
WORKSHOPS
117
Workshop 1: Employee Birth Date Report
Create a report that lists the employees' date of birth but not the entire birthdate.
Instructions
Use the V_EMPLOYEE table and include the following fields:
HOMEDEPARTMENT
FIRSTNAME (query only)
LASTNAME (query only)
BIRTHDATE (query only)
STATUS (query only)
Include only Active employees in this report.
Create a derived field named MONTH that returns the month portion of the birthdate.
Create a derived field named DATE that returns the day portion of the birthdate.
Create a derived field named EMPLOYEE that concatenates the first name and the last
name so that the column displays the first name first, and the last name last.
Sort the report by DATE.
Create a report variable that allows the user to report on a specific month.
Save the report as Work1.
CHALLENGE
Create a derived field named MTHTRANS that translates the numerical value of the birth
month into the name of the month.
Insert the value of the field MTHTRANS into the header of the report.
Use the Align Toolbox to assist in lining up the fields.
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
Workshop 1 Results
Workshop 1 CHALLENGE Results
WORKSHOPS
118
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
WORKSHOPS
119
Workshop 1 Checklist
Select the tables and fields
Create the following selection criteria
Create the derived field DATE using the following formula:
@DAY (REPORTS.V_EMPLOYEE.BIRTHDATE)
Create the derived field MONTH using the following formula:
@MONTH (REPORTS.V_EMPLOYEE.BIRTHDATE)
Create the derived field EMPLOYEE using the following formula:
REPORTS.V_EMPLOYEE.FIRSTNAME || ' ' || REPORTS.V_EMPLOYEE.LASTNAME
Sort the report by the derived field DATE
Create the report variable as follows:
Create the selection criteria as follows:
Click on Report Variables and change the Value to 10
Generate the report
Re-order, rename and resize the columns as appropriate
Save the report as Work1
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
WORKSHOPS
120
Workshop 1 Challenge Checklist
Create the MTHTRANS derived field using the following formula:
@DECODE ((@MONTH (REPORTS.V_EMPLOYEE.BIRTHDATE)),
'01','January','02','February','03','March','04','April','05','May','06','June','07','July','08','A
ugust','09','September','10','October','11','November','12','December')
Note: This formula can be used in any report that contains an @MONTH formula.
Simply substitute the REPORTS.V_EMPLOYEE.BIRTHDATE, with the date field in
your new report. Consider saving this derived field for future use.
From the menu bar, select Insert, Field
Deselect the check box Include Field Name
From the drop down menu, select Derived Fields
Drag the derived field MTHTRANS into the page header
Re-size, rename, and re-position the columns and fields as appropriate.
(Do not forget that you can use the Align Toolbox to assist in lining up the fields!)
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
WORKSHOPS
121
Workshop 2: Sick Pay Liability Report
Create a report that displays the dollar amount required to compensate employees for sick
time not yet taken (sick allowed and taken hours are stored as benefit accruals). You will
need to calculate the balance of sick hours (allowed minus taken) and then multiply it by
the employees' hourly rate.
Instructions
Use the V_YTD_BFT_ACR table and include the following fields:
HOMEDEPARTMENT
NAME
FILE#
BENACRTODATEALLOWD
(Benefit Accrual Allowed To Date)
BENACRTODATETAKEN
(Benefit Accrual Taken To Date)
BENACRPOSNO (query only)
(Benefit Accrual Position Number)
RATE1AMT query only)
RATETYPE (query only)
COMPANYCODE (query only)
STATUS (query only)
Note: For company code XYZ, sick time is stored as Benefit Accrual Position 2
Include only Active employees from company code XYZ in this report.
Only report employees with a value of 2 in BENACROPOSNO.
Create a derived field named HRLY_EQIV that returns RATE1AMT for hourly employees
and returns RATE1AMT divided by 80 for salary employees.
Create a derived field named HRS_BALANCE that calculates the balance of sick hours,
(allowed hours minus the taken hours). (Note: ReportSmith cannot perform an arithmetic
function where a blank exists in a record. Use the string function @NULLVALUE in this
formula)
Create a derived field named LIABILITY that multiplies the hourly equivalent by the
balance of sick hours. (Note: In this formula, you will be multiplying the HRLY_EQUIV
field by the HRS_BALANCE field. Consider saving both of these formulas and then
loading them into this third formula to save time)
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
WORKSHOPS
122
Sort and group the report by NAME within HOMEDEPARTMENT. Insert a group header
and footer.
Insert the HOMEDEPARTMENT field into the group header and delete this field from the
body of the report.
Format the fields to 2 decimal places.
Re-name, re-format, re-size and re-order columns as appropriate.
Provide a group total of the LIABILITY column. Rename the description to TOTAL
LIABILITY.
Change the title of the report to Sick Pay Liability.
Save the report as Work2.
Workshop 2 Results
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
WORKSHOPS
123
Workshop 2 Checklist
Select the tables and fields
Create the following selection criteria
Create the derived field HRLY_EQUIV using the following formula:
@DECODE (REPORTS.V_YTD_BFT_ACR.RATETYPE,
'H', REPORTS.V_YTD_BFT_ACR.RATE1AMT,
'S', REPORTS.V_YTD_BFT_ACR.RATE1AMT / 80,0)
Create the derived field HRS_BALANCE using the following formula:
@NULLVALUE (REPORTS.V_YTD_BFT_ACR.BENACRTODATEALLOWD, 0) @NULLVALUE (REPORTS.V_YTD_BFT_ACR.BENACRTODATETAKEN, 0)
Create the derived field LIABILITY using the following formula:
(@NULLVALUE (REPORTS.V_YTD_BFT_ACR.BENACRTODATEALLOWD, 0) @NULLVALUE (REPORTS.V_YTD_BFT_ACR.BENACRTODATETAKEN, 0)) *
(@DECODE (REPORTS.V_YTD_BFT_ACR.RATETYPE,'H',
REPORTS.V_YTD_BFT_ACR.RATE1AMT,'S',
REPORTS.V_YTD_BFT_ACR.RATE1AMT/80,0))
Generate the report
Sort and group the report by HOMEDEPARTMENT. (To save time, consider using the
icons, Sorts groups the selected column and adds a group header (or footer)
Insert the HOMEDEPARTMENT field into the group header
Re-position, re-size and re-format the columns as appropriate
Format the numerical columns to 2 decimal places. (To save time, consider
highlighting the first column, then hold your CTRL key to select the remaining
columns. Release the CTRL key and then right click. Select Format Field on the
menu that appears and select the desired format.)
Highlight the LIABILITY column and click on the SUM icon. Highlight the description
'Sum of LIABILITY' and change this label to TOTAL LIABILITY
Change the title of the report to Sick Pay Liability
Save the report as Work2
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
WORKSHOPS
124
Workshop 3: Hours and Earnings Listing
Create a report that lists the employees' regular hours and earnings, overtime hours and
earning and vacation hours and earnings in separate columns.
Instructions
Use the V_CHK_VW_EARNINGS table and include the following fields:
NAME
CHECKVIEWHOMEDEPT
CHECKVIEWREGHOURS
CHECKVIEWREGERNINGS
CHECKVIEWOTHOURS
CHECKVIEWOTEARNING
CHECKVIEWEARNSAMT (query only)
CHECKVIEWEARNSCD (query only)
CHECKVIEWPAYDATE
CHECKVIEWCHK#
Use the V_CHK_VW_HOURS table and include the following fields:
CHECKIEWHOURSCODE (query only)
CHECKVIEWHOURSAMT (query only)
Create a derived field named VAC_EARN that searches for the vacation earnings code,
V, but returns the vacation earnings amount instead.
Create a derived field named VAC_HRS that searches for the vacation hours code, V, but
returns the vacation hours amount instead.
Sort the report by CHECKVIEWHOMEDEPT, NAME AND CHECKVIEWCHK#.
Create a report variable that allows the user to report on a specific paydate.
Run this report using the paydate 02/20/2004.
Insert the CHECKVIEWPAYDATE field into the header and delete the
CHECKVIEWPAYDATE column from the body of the report.
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
Re-order and rename the columns as follows:
Table Column
CHECKVIEWHOMEDEPT
NAME
CHECKVIEWCHK#
CHECKVIEWREGHOURS
CHECKVIEWREGERNING
CHECKVIEWOTHOURS
CHECKVIEWOTEARNING
VACHRS
VACHEARN
CHECKVIEWPAYDATE
Size the columns as appropriate.
Save the report as Work3.
Workshop 3 Results:
Rename As….
DEPT
NAME
CHK#
REG HRS
REG EARN
OT HRS
OT EARN
VAC HRS
VAC EARN
PAY DATE
WORKSHOPS
125
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
WORKSHOPS
126
Workshop 3 Checklist
Select the tables and fields
Create the following selection criteria
Create the VACEARN derived field using the following formula:
SUM (DISTINCT@DECODE
(REPORTS.V_CHK_VW_EARNINGS.CHECKVIEWEARNSCD,'V',
REPORTS.V_CHK_VW_EARNINGS.CHECKVIEWEARNSAMT, 0))
Create the VACHRS derived field using the following formula:
SUM (DISTINCT@DECODE
(REPORTS.V_CHK_VW_HOURS.CHECKVIEWHOURSCODE,'V',
REPORTS.V_CHK_VW_HOURS.CHECKVIEWHOURSAMT, 0))
Turn on Database Groupings
Sort the report by CHECKVIEWHOMEDEPT,NAME and then by CHECKVIEWCHK#
Create the report variable as follows:
Create the selection criteria as follows:
Click on Report Variables and change the Value to 02/20/2004
Generate the report
From the menu bar, select Insert, Field and insert CHECKVIEWPAYDATE into the
Page Header
Re-order, rename and resize the columns as appropriate
Save the report as Work3
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
CLOSING AND EVALUATION
FEBRUARY 2004
127
Closing and Evaluation
At the beginning of today’s class we reviewed the objectives for the course. Please take
a moment and assess for your comfort level with each of the following tasks.
After completing this course, you will be able to:
•
Create complex columnar reports
•
Define and use complex derived fields using SQLBase functions
•
Create and use Report Variables
•
Generate Form and Label reports
•
Understand the process of setting up Report Scheduler
Thank you for taking the time to participate in ADP’s PC/Payroll for Windows
ReportSmith – Level 2 training course.
We depend on your feedback to improve our courses so please complete the course
evaluation.
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
REFERENCE
128
Reference
This section is designed as a reference tool for you to access as needed. Feel free to add
information to this section as you learn and your expertise grows with ReportSmith.
Items included are:
•
@DECODE, SUM(DISTINCT), Database Grouping Checklist
•
Contents Listing of the Master Reports diskette
•
ADP's Client Report Solutions Team
•
Importing Reports from the Master Reports Diskette to the Report
Catalogue
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
REFERENCE
128
@DECODE, SUM (DISTINCT), and Database Grouping
Checklist
Select the table.
Select fields to include in the report.
Are there any fields that should be included for use in the query only?
Include Selection Criteria statements.
Build the derived field
Insert @DECODE.
Complete the @DECODE statement.
Do you require a default value for employees who do not meet the criteria?
Derived
Field
Name
@DECODE
(expr,
s1,
r1,
s2,
Insert SUM (DISTINCT) at the beginning of the @DECODE statement.
Remove the SUM (DISTINCT) closing bracket.
Add an additional closing bracket at the very end of the derived field.
Test the derived field.
Turn on Database Grouping.
For any derived fields created using a summary function, enter the appropriate
Selection Criteria in the Database Grouping window.
Generate the report.
Save the report.
r2)
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
REFERENCE
128
Contents Listing of the Master Reports diskette
Reports Created and Used During Class
The following table lists the filenames used for the reports created in this course and the
module and section where they are used.
Module
@DECODE
@DECODE,
SUM(DISTINCT)
with Database
Grouping
Filename
Description
Prac1
Simple @DECODE report with 1 return value
Prac2
Simple @DECODE report with 2 return values
Prac3
@DECODE which returns a data field value
Exercise1
Columnar report which uses @DECODE which
returns 3 values
Prac4
Simple columnar Accumulator Report using
selection criteria, Is In List
Prac5
Add @DECODE to Prac4 to create 2 columns, one
for each accumulator
Prac6
Add Sum(Distinct) to Prac5
(Not a saved report)
Prac7
Add Database Grouping to Guided Practice 6
Prac8
Add Selection Statements for Derived Fields in the
Database Grouping Window
Exercise2A
Create a non-Checkview deduction listing using
@DECODE, SUM(DISTINCT) with Database
Grouping
Exercise2B
Create a Checkview Deduction Listing using
@DECODE, SUM(DISTINCT) with Database
Grouping
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
Module
Date-Time and
String Functions
Advanced
Derived Fields
(Optional
Module)
Creating Report
Variables
Filename
REFERENCE
128
Description
Prac9
Employee list including the string function @LEFT
Exercise3A
Employee list by Postal Area using the string
function @LEFT
Exercise3B
Challenge
Prac10A
Checkview Report of regular and other earnings
Prac10B
Complex derived field to combine 2 numeric fields
Prac10C
Applying @NULLVALUE in order to combine 2
numeric fields
Prac11
Using the Summary operation Concatenation
Exercise5
Add a field using concatenation to Prac11
Prac12
Create a month of hire field using @MONTH
Prac13A
Creating a length of service field using @NOW
Prac13B
Formatting the length of service report
Prac14B
Loading a saved derived field to an existing report
Prac15
A comparison report using @INT and @IF
Prac16
Rounding a field using @ROUND
Prac17
Using MIN and MAX
Prac18A
Report Variable, Choose from a list
Prac18B
Applying selection criteria to link the variable to the
report
Exercise7a
Report variable, Choose from a list
Exercise7b
Challenge exercise
Prac19
Report variable, Choose from a table
Prac20
Report variable, Date Range
Prac21
Report variable, using a derived field
Exercise8
Create a report using the Type In report variable
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
Module
Form and Label
Reports
Workshops
Filename
REFERENCE
128
Description
Prac22A
Create a label report for employee address labels
Prac22B
Applying label style to a label report
Exercise9
Create a form report for emergency contacts
Work1
Create an employee Birth Date report using
@DATE, @MONTH, Concatenation and Report
Variables
Work1A
Challenge, Use @DECODE to translate the
numerical value of month to the month name
Work2
Create a report that displays the dollar value of the
employees sick time not yet taken using
@NULLVALUE, and @DECODE
Work3
Create an employee hours and earnings listing
@DECODE, SUM(DISTINCT) with Database
Groupings and Report Variables
®
FEBRUARY 2004
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
REFERENCE
128
ADP's Client Report Solutions Team
You have a question and you need some help. While ADP's Client Report Solutions Team
is always available to you, consider trying some of the resources at your fingertips to
answer your question or meet your reporting need.
Look up your question in the ADP Sample Reports Guide – How Do I?
Many of the questions that come through on the Hotline are actually addressed in
this chapter. You’ll find this chapter easy to use because each question is listed
along with a reference to the page where you can find the answer.
Verify the Report Security on your report.
Is it correct? Do you need ‘administrator’ privileges?
Scan the Course Agenda in this manual.
Many of your questions were covered in class but it is a lot of information to
remember. Is your topic listed?
Is there a similar report that you could modify to meet your current need?
Consider using the ADP Sample Reports or the ReportSmith Level 2 Master
Reports diskette.
Before you give ADP's Client Report Solution Team a call, please ensure the following:
Launch ReportSmith
Have your report generated and displaying on your screen
Now you're ready to put in your call. Dial your standard Client Service telephone
number. Select Option 6, Sub Option 3.
You can also email queries to: [email protected]
®
ADP PC/PAYROLL FOR WINDOWS REPORTSMITH LEVEL 2
HANDOUT MANUAL
FEBRUARY 2004
REFERENCE
128
Importing from the Master Reports Diskette to the Report
Catalogue
Use these Actions to import reports from the Master Reports Diskette to your Report
Catalogue.
Step
Action
1
On the menu bar, select File ⇒ Open
2
Click the Import icon
3
Select the location of the diskette (A:\ 3 ½ Floppy)
4
Select the report you wish to import
5
Click Open
6
Select the folder you wish to import the report to (TRAINING)
7
In the Import File window, click OK
8
Highlight the report you wish to open
9
Click Open
© Copyright 2026 Paperzz