Financial Statements Using Crystal Reports

Similar documents
Intermediate/Advanced Crystal Reports

Introduction to Crystal Reports For Sage 300

SQL izing Crystal Reports

Creating Custom Financial Statements Using

Chapter 2 The Design Window

TheFinancialEdge. Crystal Reports Tutorial

Financial Reporting Using Microsoft Excel. Presented By: Jim Lee

Crystal Reports Compiled by Christopher Dairion

Table of Contents C RYSTAL R EPORTS T UTORIAL

DOING MORE WITH WORD: MICROSOFT OFFICE 2007

Excel Shortcuts Increasing YOUR Productivity

TRAINING GUIDE. Intermediate Crystal 2

DOING MORE WITH WORD: MICROSOFT OFFICE 2010

Sage ERP Accpac 6.0A. Financial Link Professional I User Guide

STAROFFICE 8 SUMMARY PROJECT

EXCEL + POWERPOINT. Analyzing, Visualizing, and Presenting Data-Rich Insights to Any Audience KNACK TRAINING

DATA WAREHOUSE BASICS

General Ledger Updated December 2017

Financial Report Guide

Part II: Creating Visio Drawings

Using Microsoft Excel

QSalesData User Guide

TRAINING GUIDE. Advanced Crystal 3

Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller

Document Formatting with Word

FrontPage 98 Quick Guide. Copyright 2000 Peter Pappas. edteck press All rights reserved.

EDITING AN EXISTING REPORT

PowerPoint 2002 Manual

How to Set up a Budget Advanced Excel Part B

Chapter11 practice file folder. For more information, see Download the practice files in this book s Introduction.

Query Studio Training Guide Cognos 8 February 2010 DRAFT. Arkansas Public School Computer Network 101 East Capitol, Suite 101 Little Rock, AR 72201

On the Web sun.com/aboutsun/comm_invest STAROFFICE 8 DRAW

eschoolplus+ Cognos Query Studio Training Guide Version 2.4

CheckBook Pro 2 Help

WORD PROCESSING FOR SALE. By Shel Silverstein

Spreadsheet Concepts Using Microsoft Excel

Microsoft Office 2010 consists of five core programs: Word, Excel,

Table of Contents. 1. Cover Page 2. Quote 3. Calculated Fields 4. Show Values As 5. Multiple Data Values 6. Enroll Today!

DOING MORE WITH WORD: MICROSOFT OFFICE 2013

PowerPoint Basics: Create a Photo Slide Show

My Sysco Reporting Job Aid for CMU Customers. My Sysco Reporting. For CMU Customers (Serviced by Program Sales)

Microsoft Excel 2007

Light Speed with Excel

MultiSite Suite: General Ledger

Simply Accounting Intelligence Tips and Tricks Booklet Vol. 1

Working with Charts Stratum.Viewer 6

CREATING CONTENT WITH MICROSOFT POWERPOINT

Outlook Web Access. In the next step, enter your address and password to gain access to your Outlook Web Access account.

Introductory Excel Walpole Public Schools. Professional Development Day March 6, 2012

MAS 90/200 Intelligence Tips and Tricks Booklet Vol. 1

Word Tips (using Word but these work with Excel, PowerPoint, etc) Paul Davis Crosslake Communications

DOING MORE WITH EXCEL: MICROSOFT OFFICE 2013

Site Owners: Cascade Basics. May 2017

Using Microsoft Access

MAPLOGIC CORPORATION. GIS Software Solutions. Getting Started. With MapLogic Layout Manager

Printing Envelopes in Microsoft Word

DOING MORE WITH EXCEL: MICROSOFT OFFICE 2010

EXCEL BASICS: MICROSOFT OFFICE 2007

Institutional Reporting and Analysis (IRA) For help, blitz "Financial Reports", or

Sage Getting Started Guide. September 2017

Crystal Reports. In Depth. Selecting an ODBC DataSource

How To Get Your Word Document. Ready For Your Editor

Reports in QuickBooks

Word processing and spreadsheet applications are among the most

SedonaOffice Users Conference. San Francisco, CA January 21 24, Vivid CPM Overview. Presented by: Bob Esquerra Debbie Stephens

OBIEE. Oracle Business Intelligence Enterprise Edition. Rensselaer Business Intelligence Finance Author Training

Quick Tips to Using I-DEAS. Learn about:

Moving Around the Spreadsheet

Copyright 2018 MakeUseOf. All Rights Reserved.

Getting Started Guide

Create and edit word processing. Pages.

Getting Started Guide. Sage MAS Intelligence 500

Table of Contents. 1. Creating a Microsoft Excel Workbook...1 EVALUATION COPY

Introduction to Microsoft Excel 2007

Welcome to Introduction to Microsoft Excel 2010

Creating and Modifying Charts

Customizing Graphical Reports

PivotTables. Mastering Microsoft Excel

Importing source database objects from a database

EXCEL 2003 DISCLAIMER:

Creating a Website Using Weebly.com (July 2012 Update)

Study Guide. PCIC 3 B2 GS3- Key Applications-Excel. Copyright 2010 Teknimedia Corporation

John W. Jacobs Technology Center 450 Exton Square Parkway Exton, PA Introduction to

Chapter at a glance. Analyze. Filter. Format. Create. Analyze data dynamically by using PivotTables, page 288

How to work a workbook

Boise State University. Getting To Know FrontPage 2000: A Tutorial

Microsoft PowerPoint: Creating Academic Posters

Using Microsoft Excel

Monthly Formulas. Order Reports by Last Name Issue No.1 Jan Last year, this year & next year Issue No.2 Feb 2007

Keynote 08 Basics Website:

FIN 850: UDW+ Finance Ad Hoc Reports Training Version 2.9

SharePoint 2010 Site Owner s Manual by Yvonne M. Harryman

Part 1: Understanding Windows XP Basics

GUARD1 PLUS Manual Version 2.8

Microsoft Windows SharePoint Services

Quick Start Guide - Contents. Opening Word Locating Big Lottery Fund Templates The Word 2013 Screen... 3

TRAINING GUIDE. Advanced Crystal 1

Rev. C 11/09/2010 Downers Grove Public Library Page 1 of 41

Workshop. Import Workshop

General Ledger Report Writer Users Guide

Transcription:

Sessions 6-7 & 6-8 Friday, October 13, 2017 8:30 am 1:00 pm Room 616B Sessions 6-7 & 6-8 Financial Statements Using Crystal Reports Presented By: David Hardy Progressive Reports Original Author(s): David Hardy Revised Date: Major Revisions Include: o o o Credits/Revision History Financial Statements Using Crystal Reports - 1

Introduction What You Will Learn Welcome to this Building Financials Statements using Crystal Reports for Sage 300. This course is designed to teach you Crystal features and techniques that will help in designing and formatting compelling Financial Statements. These techniques are intended to build upon skills you previously learned in an introductory course. This course is divided into discussion of concepts and activities. If you have not had an introductory course and/or have not worked with Crystal Reports some of the discussions and activities may be beyond your skill level. If that is the case feel free to stop the activities and just watch. You will at least learn what is possible and can re-take the course at a later time when you have sufficient introductory knowledge to follow along with the activities. This guide is intended to help meet the following objectives: Review of ODBC and Sage 300 Why use Crystal Reports for Sage 300 Financials Questions to ask before building any report Selecting the tables and fields to use Creating our SQL statement Linking tables Filtering Reports to return just the data you want Grouping your data for better display Summaries including Sub and Grand totals Formatting fields and sections And many more tips and tricks along the way! Financial Statements Using Crystal Reports - 2

ODBC We can t have a discussion about modifying canned Crystal Reports for Sage 300 without first discussing ODBC. This point is often lost in the discussion and it is the foundation of a successful experience modifying custom reports. ODBC stands for Open Database Connectivity and was introduced into the computer world many decades ago. It allows two programs to speak to each other and in some cases pass data back and forth between them. Think about it like this. A German and a Frenchman may not speak each other s languages (similar to two propriety software packages) however if they both speak a third language such as English then the will be able to communicate with one another. ODBC is like a meeting place where diverse software such as Sage 300 and Crystal Reports that do not know anything about each other, can speak a common language. That language is SQL or Structured Query Language. When Crystal Reports runs a report, it actually sends to Sage 300 instructions written in SQL on what data it wants returned. Both the sender and the receiver can understand the request. For us to be able to not only modify a canned Crystal Report but to preview them while in Crystal or to introduce new fields and tables we must first setup ODBC on our PC first. Therefore, when back at your PC where you have both Sage 300 and Crystal Reports installed you will need to setup ODBC so that you can do those edits and previews. If you cannot change your ODBC settings in the way you re about to learn, then you may not have rights to do so and you will need to get your IT Dept. involved to give you those rights. You do not need to set this up each time you modify a report. You do this once for the most part and often don t have to change it for years. Almost everyone is now using a 64-bit machine (PC) with a 64-bit operation system such as Windows 7 or Windows 8 & 10. Sage 300 still uses a 32-bit ODBC driver. They are not alone, many other software companies including some of Sage 300 competitors still use a 32-bit ODBC driver. By default, when you navigate to your computers control panel looking for the ODBC setup area you will find the 64 bit in almost every case. You won t realize it is the 64-bit spot but it will be. Therefore, you need to remember that you must navigate to the 32-bit ODBC administrator area. This is hidden a bit but you can find it. There are two ways to find the 32-bit ODBC setup area. The first is to simple navigate to by going to Start menu, select All Programs> ODBC > 32bit ODBC Administrator to open the Data Source Administrator window. However, my favorite way is to simple type in 32 at the Windows start search area. That almost always brings up a list of files that start with 32 and the 32 ODBC Administrator will be at the top of the list. Financial Statements Using Crystal Reports - 3

ODBC Overview In this section we will cover: What is it? Setting Up ODBC The Magic of the Timberline Data Source ODBC stands for Open Database Connectivity. ODBC came about in the 80 s and revolutionized how databases talked to each other. Basically, it allows two products that may have nothing in common to communicate with each other and pass data back and forth between each other. This could be Excel and Sage 300 or it could Crystal and Sage 300. The two products involved don t really matter; they must have ODBC drivers installed on the machine you are using to communicate with each other. Note: Not that anyone will ever ask you, but ODBC talks in the language of SQL or Structured Query Language. Those of you who know SQL can further customize/optimize your reports directly using SQL Commands. The rest of us don t need to be worried, Crystal handles it all just fine for us too. Setting Up ODBC: Sage 300 comes with an ODBC Driver that automatically works its magic if you just want to run Crystal Reports from the Sage 300 reports menu. However, since we are in this course to be the report writers we need to setup ODBC on our machines so that Crystal can communicate with Sage 300 during the report building and testing phase. Once the report is deployed on the Reports menu in Sage 300, it will run without problems, if we just follow a few steps. Financial Statements Using Crystal Reports - 4

Pre-Activity 1: Setting up ODBC on your computer: From the Control Panel 1. Open ODBC Data Sources 32 bit. (Start menu > Control Panel > Administrative Tools > ODBC Data On Windows 8 & later machines, just start typing 32 from the Start page and you ll quickly see an option to pick 32 ODBC Administrator. On Windows 7 machines, click the Start button and then type 32 in the search box and you ll quickly see an option to pick 32 ODBC Administrator. 2. From the User tab, select or highlight the Timberline Data Source. 3. Click [Configure]. 4. Click on [Select Folder] and pick Timberline Construction Sample Data or your Live Data folder if doing this activity in your office. Financial Statements Using Crystal Reports - 5

5. Click on the Option Button at the bottom right and make sure to Remove the check mark from Shorten field and table names. Leave the check mark on Use maximum table segment size checked. 6. Click [OK] twice. What s so Magical about the Timberline Data Source ODBC DSN In almost every case, you want to build Crystal Reports using the DSN (Data Source name) Timberline Data Source. By using this DSN, Sage 300 takes over when the report is run from the reports menu and does the following. Automatically switches to the data folder you are running the report from. This is critical for companies who have more than one data folder. Allows the use of all the Sage 300 functions such as: o o o Asking which file to use (New, Current, History) Letterhead style Automatically sign you in so you are not asked your User name and password. o And many more functions described in the Users Guide.PDF installed with Sage 300. Automatically sets itself back up if the DSN is ever deleted or a new version of Sage 300 is installed. Create Range Button when running reports from the Sage 300 reports menu. o Takes a couple of formulas and a parameter setup in Crystal Reports. You can use other DSN s but the Magic listed above will not work! Financial Statements Using Crystal Reports - 6

Why use Crystal Reports to Build Financial Statements for Sage 300 Sage has a great product for building Financials already, Financial Statement Designer (FSD). FSD has all sorts of built in logic and functions and completely understands the Sage 300 database. Crystal Reports doesn t know a thing specifically about Sage 300. So, why would we ever think of using a product that isn t intimately knowledgeable of the Sage financial data? Here are some reasons why: Presentation Quality output Ability to format with color, pictures, font changes to bring attention to important data Ability to roll back further than FSD will allow Drill-down capabilities Ability to pull data into the Financial from other modules such as Job Cost, Accounts Payable, Accounts Receivables, Service Management and much more Ability to pull data in from other Databases that are not related to Sage Custom linking Before Starting, ask these Questions Before you ever open Crystal Reports and begin to build the report, you should go through a set of questions to make sure you design your new report correctly, efficiently and quickly the first time. Too many times, reports are created simply to be scraped and re-written because we didn t ask the right questions up front. First, figure out who the audience is and ask questions of them. It is imperative that you have answers to these questions before you start. The answers you receive may very well change the data tables you select and the approach you take in building the report. Questions to ask before you begin the Crystal Report: Transaction vs. Master? Do we need the ability to Roll-back and have a cutoff date? Do we need the ability to Export to Excel? Do we need to include General Ledger Budgets? Need Monthly columns or simply one column? Do we want YTD columns or just a Current column? Financial Statements Using Crystal Reports - 7

Grouping questions to ask before you begin the Crystal Report: Do we need to break out each Prefix (Company/Division) separately or summarize together? o Perhaps ask at run time through the use of Parameter Do we need sub-grouping totals such as Construction Income and then a subtotal etc. Do we need to summarize several accounts into one line/row such as all Labor cost accounts roll into one line or print all of them out separately? Do we need the ability to Export to Excel? Do we need to include General Ledger Budgets? Need Monthly columns or simply one column? Do we want YTD columns or just a Current column? Filtering questions to ask before you begin the Crystal Report: Do we need to show Accounts that have zero balances and/or zero activity in the period? Do we need to prompt for Prefix and cutoff dates like we spoke about earlier? Financial Statements Using Crystal Reports - 8

Use SQL to select tables & fields needed Building Crystal Financials using Crystal Reports can be challenging at times as Crystal doesn t have built in formulas and functions based on the Sage database the way FSD does. Those formulas will need to be built by you! The more you understand the Sage 300 database, the way the data is stored and flows throughout time the easier building Crystal Reports will be. Because the length of our class today is limited we will build a relatively straight forward Income Statement using Master table fields. We will build a Current column and YTD column Income Statement with the ability to roll back several months. The skills you learn today will help you build your own Transaction table version that can be rolled back as far back as you have data. We will be using SQL today, which will allow us to avoid using subreports. Subreports are amazing and they make Crystal Reports a far better tool to report with than many of its competitors. However, subreports can slow down a report and they do make it harder to cleanly export to Excel. Activity 1 Building the SQL Statement As previously noted, we will be using SQL to create a virtual table holding all the fields we need to create our report. This SQL Statement will combine fields from multiple tables in the Sage 300 database. We use SQL so we can avoid subreport and export to Excel better plus we get the benefit of much faster speed. Most folks think Crystal is slow but it is actually as fast as or faster than any other reporting tool out there. What makes Crystal seem slow with Sage 300 is the Sage ODBC driver. The driver has been improved as of late and with the use of SQL statements we can obtain pretty darn fast speeds when running reports against Sage 300. In this Activity, we will build a SQL statement that will then be placed in Crystal Reports: 1. Open Notepad on your PC 2. Type the following SQL Statement in the blank Notepad document select a.account, left(a.account,2) as Prefix, right(a.account,4) as Base, a.account_title, Financial Statements Using Crystal Reports - 9

a.account_type, a.current_balance, a.current_period_activity, a.prior_1_activity, a.prior_2_activity, a.prior_3_activity, a.prior_4_activity, a.prior_5_activity, a.prior_6_activity, a.prior_7_activity, a.prior_8_activity, a.prior_9_activity, a.prior_10_activity, a.prior_11_activity, a.prior_12_activity, a.year_1_period_1_activity, a.year_1_period_2_activity, a.year_1_period_3_activity, a.year_1_period_4_activity, a.year_1_period_5_activity, a.year_1_period_6_activity, a.year_1_period_7_activity, a.year_1_period_8_activity, a.year_1_period_9_activity, a.year_1_period_10_activity, a.year_1_period_11_activity, a.year_1_period_12_activity, a.account_type, pa.period_code, pa.period_ending_date from GLM_MASTER ACCOUNT a inner join GLM_MASTER ACCOUNT_PREFIX_A pa on left(a.account,2) = pa.account_prefix_a 3. Open up Crystal Reports on your PC 4. Start a new report using File/New/Blank Report Option 5. If Timberline Data Source is not visible, select Create New Connection from Available Data Sources selection window. The select ODBC 6. Select the Timberline Data Source as your target Data Source Financial Statements Using Crystal Reports - 10

7. Under Timberline Data Source, select Add Command by double clicking on it 8. The Add Command dialog box will open 9. Copy and Paste the contents from the Notepad into the Add Command box (Be sure to get it all) Financial Statements Using Crystal Reports - 11

10. Click OK to close the Add Command box (If you get an error, check your code) 11. Click OK to Close the Database Expert 11. From the File menu, Save your Report as Activity One You just created a SQL statement inside Crystal Reports. The advantages of SQL are many, but for our use today, you have created a SQL statement that will combine data from the GL master Account table and the GL master Prefix A table. Doing so has allowed us to avoid using a subreport. This results in quicker speed and better export to Excel. Anytime Add command is used, a SQL statement is being created. The statement is sent to the Sage 300 server and only the records needed are returned to your workstation. Hopefully, you noticed that SQL isn t that hard and is pretty easy to read and understand. You may have also noticed we used a SQL function Left and a SQL function Right, which works just like the function in Excel or Crystal normally works. Left is used the first two digits of the full account number to link to the prefix A in our sample data. Right is used to pull the last four digits of the full account number as those four digits are the base account in our sample data. Financial Statements Using Crystal Reports - 12

Filter the report So far, we have built a SQL statement to pull General Ledger data. We now need to filter which accounts are returned to our report. In this activity we will alter our SQL Statement to further refine what we want and increase the speed of the report. Activity 2 Filter on Account type In this Activity, we will modify our SQL statement: 1. Open Activity One.rpt if it is not currently open 2. Using the Database menu Select Database Expert 3. Right click on Command in the right box 4. Select edit command 5. At the end of the SQL statement previously typed in Activity 1, type the following: Where right(a.account,4) between '4000' and '7999' 6. Click OK to close the Modify Command box (If you get an error, check your code) 7. Click OK to Close the Database Expert 8. From the File menu Save your Report as Activity Two Financial Statements Using Crystal Reports - 13

Group and Sort the report So far, all we have done is build and alter the SQL statement. If you look at the face of the report, it appears we have not done a thing so far. Like any good construction project the foundation is the most important thing to get right. We ve built a solid foundation to this point and we have a bit more to go. Activity 3 Specified Groups In this Activity, we will build specified groups that will allow us to expertly sort and group our data the way we want to: 1. Open Activity Two.rpt if it is not currently open 2. Click on the Group Expert button 3. Drag the field Base from the left box to the right box 4. Select Options from the bottom right box to open the Change Group Options window 5. From the in ascending order drop down list select in specified order : Financial Statements Using Crystal Reports - 14

As soon as you pick Specified Order you have a new box pop that looks like this: This box allows you to create groups that would be difficult to do otherwise. Here, we will create groups that sort the data and allow us to have subtotals. 6. Click New and type in Total Income Financial Statements Using Crystal Reports - 15

7. Select is between from the drop down list and type in 4000 and then 5005 in the lower box as seen in the screen print above 8. Click OK once only 9. Click New again and type in Total Expense 10. Select is between from the drop down list and type in 5110 and then 6121 in the lower box 11. Click OK once only 12. Click New again and type in Total Other Income 13. Select is Equal to from the drop down list and type in 1000 14. Click OK once only We include Other Income in the design simply to show you how it is done. Sample data does not have any Other Income or Other Expenses. Your screen should look similar to the one below Financial Statements Using Crystal Reports - 16

15. Click Others at the top right of the box as seen above 16. Click Discard all others 17. Click OK 18. From the File menu, Save your Report as Activity Three You just created a Specified Order Group. It may not be apparent the significance of what you just did but I promise you will find dozens of uses for specified groups. Financials are an easy one but there are hundreds of other great uses for specified groups. Activity 4 Specified Groups continued In this Activity, we will build a second specified group that will allow us to subtotal on our smaller groups such as income and expenses separately. 1. Open Activity Three.rpt if it is not currently open 2. Click on the Field Explorer button to bring up Field Explorer 3. Right click on Formula Fields and click New to create a new formula Financial Statements Using Crystal Reports - 17

4. Name the new formula Small Base and click OK 5. Click the + to the left of Timberline Data Source and Command. Insert Base into the new formula (See example below) 6. Click on Save and close at top left of the formula window 7. Click on the Group Expert button like you did before in Activity 3 8. Drag the formula Small Base from the left box to the right box 9. Highlight @Small Base-A in the right box and select options at the bottom right box 10. From the Change Group Options drop down list select Specified Order : 11. Click New and type in Income Financial Statements Using Crystal Reports - 18

12. Select is between from the drop down list and type in 4000 and then 4999 in the lower box 13. Click OK once only 14. Click New again and type in Cost of Sales 15. Select is between from the drop down list and type in 5001 and then 5005 in the lower box 16. Click OK once only 17. Click New again and type in Expenses 18. Select is between from the drop down list and type in 6001 and then 6121 in the lower box 19. Click OK once only 20. Click New again and type in Other Income 21. Select is equal to from the drop down list and type in 1000 22. Click OK once only 23. Click Others 24. Click Discard all others 25. Click OK 26. Click OK to close Group Expert Financial Statements Using Crystal Reports - 19

27. From the File menu Save your Report as Activity Four You just created a second Specified Order Group. The reason we have this second group is so we can have subtotals for each of these groups. We used a formula to hide Base inside so that both groups would not use the field base. This becomes important when doing subtotals and formulas and avoids mistakes that can easily happen when you use the same field twice for separate groups. Add fields, formulas and parameters Finally, let s start to work on adding fields, formulas, and parameters and see what we get. Activity 5 Add fields In this Activity, we will add a few fields to the report to make sure our SQL statement, Groups and Filtering is working. 1. Open Activity Four.rpt if it is not currently open 2. Click on the Field Explorer button to bring up Field Explorer 3. From the Database fields, select the Account, Account Title. You can select more than one field at a time by holding down Control 4. Drag the highlighted fields to the left side of the Detail Section 5. Print Preview the report using the Refresh Icon or tap the F5 key on your keyboard Financial Statements Using Crystal Reports - 20

6. Using Field Explorer add a new Parameter and call it Roll Back 7. Select String as the Type 8. In the Middle section, type in the following 0 through 11 just as the example below show Financial Statements Using Crystal Reports - 21

9. Fill in the remaining options identical as that in the above example 10. Click OK to close the window 11. Using Field Explorer create a new Formula named Current Period. Type the following ( select tonumber ({?Roll Back}) case 0 : {Command.Current_Period_Activity} case 1 : {Command.Prior_1_Activity} case 2 : {Command.Prior_2_Activity} case 3 : {Command.Prior_3_Activity} case 4 : {Command.Prior_4_Activity} case 5 : {Command.Prior_5_Activity} case 6 : {Command.Prior_6_Activity} case 7 : {Command.Prior_7_Activity} case 8 : {Command.Prior_8_Activity} case 9 : {Command.Prior_9_Activity} case 10 : {Command.Prior_10_Activity} case 11 : {Command.Prior_11_Activity} case 12 : {Command.Prior_12_Activity} default : {Command.Current_Period_Activity} ) * -1 12. Click Save and Close 13. Using Field Explorer create a second formula named Current Balance. Type the following ( {Command.Current_Balance} - ( select tonumber ({?Roll Back}) case 0 : 0 case 1 : {Command.Current_Period_Activity} case 2 : {Command.Current_Period_Activity} - {Command.Prior_1_Activity} Financial Statements Using Crystal Reports - 22

case 3 : {Command.Current_Period_Activity} - {Command.Prior_1_Activity} - {Command.Prior_2_Activity} case 4 : {Command.Current_Period_Activity} - {Command.Prior_1_Activity} - {Command.Prior_2_Activity} - {Command.Prior_3_Activity} case 5 : {Command.Current_Period_Activity} - {Command.Prior_1_Activity} - {Command.Prior_2_Activity} - {Command.Prior_3_Activity} - {Command.Prior_4_Activity} case 6 : {Command.Current_Period_Activity} - {Command.Prior_1_Activity} - {Command.Prior_2_Activity} - {Command.Prior_3_Activity} - {Command.Prior_4_Activity} - {Command.Prior_5_Activity} case 7 : {Command.Current_Period_Activity} - {Command.Prior_1_Activity} - {Command.Prior_2_Activity} - {Command.Prior_3_Activity} - {Command.Prior_4_Activity} - {Command.Prior_5_Activity} - {Command.Prior_6_Activity} case 8 : {Command.Current_Period_Activity} - {Command.Prior_1_Activity} - {Command.Prior_2_Activity} - {Command.Prior_3_Activity} - {Command.Prior_4_Activity} - {Command.Prior_5_Activity} - {Command.Prior_6_Activity} - {Command.Prior_7_Activity} case 9 : {Command.Current_Period_Activity} - {Command.Prior_1_Activity} - {Command.Prior_2_Activity} - {Command.Prior_3_Activity} - {Command.Prior_4_Activity} - {Command.Prior_5_Activity} - {Command.Prior_6_Activity} - {Command.Prior_7_Activity} - {Command.Prior_8_Activity} case 10 : {Command.Current_Period_Activity} - {Command.Prior_1_Activity} - {Command.Prior_2_Activity} - {Command.Prior_3_Activity} - {Command.Prior_4_Activity} - {Command.Prior_5_Activity} - {Command.Prior_6_Activity} - {Command.Prior_7_Activity} - {Command.Prior_8_Activity} - {Command.Prior_9_Activity} case 11 : {Command.Current_Period_Activity} - {Command.Prior_1_Activity} - {Command.Prior_2_Activity} - {Command.Prior_3_Activity} - {Command.Prior_4_Activity} - {Command.Prior_5_Activity} - {Command.Prior_6_Activity} - {Command.Prior_7_Activity} - {Command.Prior_8_Activity} - {Command.Prior_9_Activity} - {Command.Prior_10_Activity} case 12 : {Command.Current_Period_Activity} - {Command.Prior_1_Activity} - {Command.Prior_2_Activity} - {Command.Prior_3_Activity} - {Command.Prior_4_Activity} - {Command.Prior_5_Activity} - {Command.Prior_6_Activity} - {Command.Prior_7_Activity} - {Command.Prior_8_Activity} - {Command.Prior_9_Activity} - {Command.Prior_10_Activity} - {Command.Prior_11_Activity} Financial Statements Using Crystal Reports - 23

default : 0 ) ) * -1 14. Click Save and Close 15. Add the Formula Current Period to the report by dragging it from the Field Explorer into the detail section, just to the right of the Account Title 16. Add the Formula Current Balance to the report by dragging it from the Field Explorer into the detail section, just to the right of the Current Period. 17. Print Preview by tapping F5 on your keyboard. Enter 0 for Roll Back. 18. From the File menu, Save your Report as Activity Five Financial Statements Using Crystal Reports - 24

Add totals and formatting One of the most compelling reasons to use Crystal Reports for financials is the ability to format the report to look professional. No better reporting tool exists for making things look gorgeous and professional than Crystal Reports. In the section, we will add subtotals and formatting features. Activity 6 Add fields In this Activity we will add subtotals and grand totals and hide accounts with zero activity and balances. 1. Open Activity Five.rpt if it is not currently open 2. Right Click on the Current Period formula in the Detail section and pick Insert Summary 3. Check the box Add to all Group Levels then click OK 4. Right Click on the Current Balance formula in the Detail section and pick Insert Summary 5. Check the box Add to all Group Levels then click OK You have now added Group Subtotals for Income, Cost of Sales and Expenses etc. Financial Statements Using Crystal Reports - 25

6. Click on the Section Expert icon to open up section expert 7. Highlight the detail section on the left side of the window. Then click on the X+2 formula to the right of the Suppress (No Drill-Down) button 8. In the Suppression formula type the following formula round({@current Period},2) = 0 and round({@current Balance},2) = 0 9. Click Save and Close 10. Click OK Your report is starting to take shape and should look something like this: Financial Statements Using Crystal Reports - 26

11. From the File menu, Save your Report as Activity Six Activity 7 Formatting the report In this Activity, we will clean up the report, add a Title and make the report presentable. 1. Open Activity Six.rpt if it is not currently open 2. From the Insert menu select Insert Text Object 3. Draw a text box in the Report Header 4. Type inside the Text box Income Statement 5. Center the text within the Text box and then center the Text box on the page 6. Change the font size for the Text box to Arial 15 and bold the text 7. Right Click on the text box and select Format Text Financial Statements Using Crystal Reports - 27

8. On the Border tab, select the check box for Drop Shadow 9. Remove all underlining in the column heading titles 10. Remove all underlining in the column heading titles 11. Bold the column headings 12. Draw a line below all column headings 13. From the File menu, save your Report as Activity Seven Financial Statements Using Crystal Reports - 28

Activity 8 Final Formatting In this Activity, we will further format the report, add subtotal headings and make it completely presentable. 1. Open Activity Seven.rpt if it is not currently open 2. Right Click on the formula Current Period in the detail section and select Format Field 3. Select the Number tab 4. Then select the Customize button 5. Click on the X+2 button to the right of Reverse Sign for Display 6. Type the following formula: GroupName ({@Small Base}) <> "Income" 7. Click Save and Close 8. While still in the Custom Style Window, change Negatives to (123) 9. Click OK twice to save and exit fully from Field Formatting 10. Click on the Current Balance formula in the detail section and repeat steps 2 through 9 11. Click OK twice to save and exit fully from Field Formatting 12. Do steps 2 through 9 for the subtotals in Group Footer 2 13. Change Group 1 subtotals and Report Totals to present negatives this way (123) instead of this way - 123 14. Using Section Expert, suppress Group Header 1 Financial Statements Using Crystal Reports - 29

15. Using Section Expert, suppress Group Footer 1 using the formula below onlastrecord; Your report should look similar to the following: Financial Statements Using Crystal Reports - 30

16. Insert a text object and place it in group footer 2 just to the left of the Current Period amount 17. Type inside the text object the word Total: Financial Statements Using Crystal Reports - 31

18. Right Justify the text inside the text object 19. Using Field Explorer, drag Group #2: @Small Base into the text object to the left of the word Total: 20. Bold the Text box. Size Same Height and Align Tops with Group Footer 2 Current Period. 21. Insert a text object and place it in group footer 1 just to the left of the Current Period amount 22. Inside the Text Object, type the words Income After Cost of Goods Sold: 23. Bold the Text box. Size Same Height and Align Tops with Group Footer 1 Current Period 24. Lastly, Insert a text object and place it in the report footer just to the left of the Current Period amount 25. Inside the Text Object, type the words Net Income: 26. Bold the Text box. Size Same Height and Align Tops with Report Footer Current Period 27. From the File menu, Save your Report as Activity Eight Financial Statements Using Crystal Reports - 32

Financial Statements Using Crystal Reports - 33

In Conclusion Today, we ve used several Crystal features to build a straight forward Income Statement. Perhaps most important we ve used a custom SQL statement to pull only the fields we needed making the report run quicker and export better to any format including Excel. We ve used Select Case formulas that are more efficient and can be executed on the server for again, faster speed. This report can be further enhanced by using Transactions to roll back even further or on-demand subreports can be later added to have drill downs to entries. Keep in mind that though we built a simple Income statement today the tricks and features we learned will be useful in all your Crystal Report writing. Financial Statements Using Crystal Reports - 34