Home > Articles > Data > BusinessObjects/Crystal Reports

This chapter is from the book

Using the Standard Report Creation Wizard

The Standard Report Creation Wizard is the most often used design assistant in Crystal Reports. It provides multiple dialogs common to creating reports that are based on conventional corporate data sources. The Standard Report Creation Wizard guides you through selecting a data source, linking data source tables, adding data source fields to the report, specifying field groupings, identifying summary (total) fields, and setting the desired sort criteria for your report.

Additionally, the Standard Report Creation Wizard walks you through creating chart objects, applying record selection criteria (data filters), and applying predefined templates (layouts) to your report.

NOTE

The term filter is commonly used to describe data selection criteria that narrow the scope of the data being extracted by the report from the underlying data source. For example, by using a filter such as Country = USA, you can easily limit your report to include only the information you are interested in extracting.

In total, the Standard Report Creation Wizard consists of nine dialog screens that allow you to specify the criteria mentioned previously to quickly create a professional looking report. The sequence of the wizard's dialog screens is dynamic and directly associated with the items selected in each of the progressive screens. For example, if you do not choose to identify any summary items for your report, you will not be presented with a Chart dialog screen. In general, charts apply best to summarized data, so if you have not identified any summary fields, the wizard assumes that you do not want to include a chart object in your report.

NOTE

Charts can also be created from base-level data, although to do this you must appropriately specify the On Change Of option and use the Advanced settings with the Chart Expert. Generally, it makes more sense to base chart objects on summary-level data, such as regional sales by quarter—where you are charting the total sales for each quarter rather than each sales transaction in each quarter.

It's now time to practice using the Standard Report Creation Wizard. In the following exercises, we will discuss each of the steps in the wizard and build a sales report to display last year's sales by country. By making use of the Standard Report Creation Wizard, we will include the country, city, customer name, and last year sales database fields, graphically display a summary of last year sales by country, and apply professionally styled formatting to the report.

  1. From the Report Gallery dialog, select Using the Report Wizard in the upper portion of the screen, and then select Standard from the wizard list in the lower portion of the screen. Click OK to initiate the Standard Report Creation Wizard.

  2. As shown in Figure 4.2, you should now be presented with the first dialog—labeled Data—as part of the Standard Report Creation Wizard. From the Data dialog screen, expand the Create New Connection node and then expand the ODBC listing as well. This should present the ODBC Data Source Selection dialog.

NOTE

To expand the listing items (also commonly known as nodes), click the + sign to the left of each particular item.

Figure 4.2 The Standard Report Creation Wizard begins by requesting a data source for your report.

  1. From the ODBC Data Source Selection dialog, scroll to the end of the Data Source Name list and select the Xtreme Sample Database 9 item, as shown in Figure 4.3. Click Next to continue.

Figure 4.3 The ODBC Data Source Selection dialog allows you to select a valid connection to access your ODBC data sources.

  1. As illustrated in Figure 4.4, verify that the Data Source Name is correct and click Finish from the ODBC Connection Information dialog. No password is necessary to access this database.

Figure 4.4 The ODBC Connection Information dialog asks you to verify the connection information to access your ODBC data sources.

  1. After you have successfully identified and connected to Xtreme Sample Database 9, you should see this item listed under the ODBC node in the Available Data Source area of the Data dialog screen, as shown in Figure 4.5. Upon expanding the Xtreme Sample Database item, you should see three distinct data source items listed: Tables, Views, and Stored Procedures (shown in Figure 4.6) .

Figure 4.5 The Xtreme Sample Database will be listed under the Available Data Sources area of the Data dialogscreen.

Figure 4.6 Upon expanding the Xtreme Sample Database item, you will notice multiple database items listed.

  1. Within the Data dialog screen, select the Customer and Orders tables so that they are listed in the Selected Tables area on the right (as shown in Figure 4.7). After these two tables are selected, click Next to continue.

TIP

There are multiple ways to include tables in your report from within the Data dialog screen. From the list of available tables on the left side of the dialog, you can perform any one of the following actions to populate the Selected Tables list on the right side of the dialog area:

  • Double-click on each desired table item

  • Drag-and-drop each desired table item

  • Highlight the table item on the left and click on the respective arrow icons (> or >>)between the two listing areas to populate the listing on the right

Figure 4.7 The Customer and Orders tables should now be listed in the Selected Tables area.

  1. The Link dialog screen presents a visual representation of the relationship between these two tables and permits you to modify the defined relationship by specifying the exact Join links that you require to accurately report on the data within the selected tables. As shown in Figure 4.8, you should now see the Link dialog screen. For our purposes here, we will accept the default Join condition. Click Next to continue.

Figure 4.8 The Customer and Orders tables are linked together via the Customer ID field.

What Is a Link?

A link is often described as a field common to two or more database tables, which serves as a connecting point between those database tables. Crystal Reports uses the link to match up records from one database table with those from one or more other database tables. For example, if two database tables each contain a Customer ID field (even though the fields might have different names), Crystal Reports can use these fields to electronically connect the records in one database table with the corresponding records in the other table. As a point of reference, the term link in Crystal Reports is equivalent to the term relationship in Microsoft Access. See Hour 3 for more details on Join types.

  1. After specifying the table linking, you will see the Fields dialog screen, shown in Figure 4.9. Select the Country, City, Customer Name, and Last Year's Sales fields so that they appear under the Fields to Display area on the right. If necessary, you can use the up and down arrows to modify the order of these fields in the list. Click Next to continue.

Figure 4.9 The Country, City, Customer Name, and Last Year's Sales fields should appear under the Fields to Display area.

  1. You should now see the Grouping dialog screen. This dialog allows you to identify logical groups of information within your reports. For this example, select to group by the Country field only, as shown in Figure 4.10. Click Next to continue.

    The Summaries dialog screen allows you to identify summary values to complement the report's structure and how you want to present the information within your reports. If you do not identify any grouped items in a report, you will not see the Summaries dialog because summaries are only applicable to grouped data. For example, if you are grouping your report according to the country field, you might want to see a sum of last year's sales figures for each country group.

Figure 4.10 The Grouping dialog allows you to create structured groupings of information within your report.

  1. You should now see the Summaries dialog screen. To apply a summary object to the report, select the Last Year's Sales field so that it appears under the Summarized Fields list on the right. This is shown in Figure 4.11. Click Next to continue.

NOTE

As you might notice, Crystal Reports automatically chooses a summary for you if you choose to group your report data. It will examine the detail information you've specified for the report and build a summary on the first available numeric field. However, this default summary criteria can easily be modified.

Figure 4.11 The Summaries dialog screen allows you to create summarized values that are frequently used in coordination with the grouping structure within reports.

NOTE

By default, the Last Year's Sales field that appears under the Summarized Fields area on the right is aggregated as a Sum of the actual field value. As shown in Figure 4.11, the drop-down list located in the lower-right area of the Summaries dialog screen allows you to select from a variety of summaries, including Sum, Average, Maximum, Minimum, Count, Correlation, Covariance, and Standard Deviation.

  1. We will now sort the report based on last year's sales of the top five countries. The Group Sorting dialog screen allows you to sort the grouped fields based on the summarized totals. From the Group drop-down list, select the Country field (the only option in our example here) and select the Top 5 Groups option from the Group Ordering choices. Also, select the Sum of Last Year's Sales item from the Comparing Summarized Values drop-down list, as shown in Figure 4.12. Click Next to continue.

Figure 4.12 The Group Sorting dialog allows you to sort your report based only on the Group values that you want to include in the report results.

  1. Let's add a chart to visually display the top five performing countries according to last year's sales. From the Chart dialog screen, you can select a chart object to be included in the report based on the group and summary items you identify here. For our example, we will add a bar chart and select the Country field from the On Change Of drop-down list and the Sum of Last Year's Sales item from the Show Summary drop-down list. Change the chart title to read, Last Year's Sales by Country—see Figure 4.13 for additional guidance. Click Next to continue.

Figure 4.13 The Chart dialog allows you to select a chart object for your report based on the previously identified group and summary criteria.

  1. Let's assume that we are only interested in customer records in which last year's sales are greater than $1,000. The Record Selection dialog screen allows us to identify selection criteria, often called data filtering, to isolate the resultset of the report to include only the information we are interested in returning. We make this distinction by selecting Last Year's Sales as the Filter Field, choosing Is Greater Than from the filter operators drop-down list, and typing in 1000.00 in the value drop-down list, as shown in Figure 4.14. Click Next to continue.

Figure 4.14 The Record Selection dialog permits you to narrow your resultset based on the selection criteria identified here.

  1. Finally, we will apply a predefined style to our report. From the Template dialog screen, you can select predefined styles to be applied to your report for formatting purposes, as shown in Figure 4.15. The Available Template list includes various sample templates that are included with the Crystal Reports 9 installation. However, you can also create your own templates to be used for report formatting. For this example, select the Block Sample (Blue) template. For additional details on how to design and implement your own templates, see Hour 19, "Designing Effective Report Templates."

Figure 4.15 The Template dialog permits you to select predefined styles to be applied to your report.

This now concludes the Standard Report Creation Wizard example. After you click Finish, you will execute the report that you have just created and will be presented with the preview of the corresponding resultset. At this point, you can click Finish if you are satisfied with the report design criteria. When you are presented with the preview of you report, save your new report by selecting Save As from the File menu. Name this report StdReportWizard1.rpt.

NOTE

In Crystal Reports terminology, a template can be a copy of a report used as the starting point for creating a new report, or it can be a report whose formatting and functionality is applied to a new report created in the Standard Report Creation Wizard. As it relates to this exercise, you are using a report template to apply one of several professionally designed styles to your report for formatting purposes only. Regardless of which method is used, when acting as a template, the original report remains unchanged.

After you select Finish at the end of the Standard Report Creation Wizard process, you will be presented with the executed resultset and a preview of your newly created report. As Figure 4.16 shows, creating a useful and professional looking report is extremely simple when using the Standard Report Creation Wizard. In the preceding exercises, you have connected to a database, identified the tables and fields you wanted to include in your report, linked the tables together, grouped and summarized the data, sorted the data, applied filtering criteria, included a chart object for enhanced visualization of the report results, and applied a report template for quick and easy formatting—all in just a few clicks of your mouse! This process speaks both to the ease of use and power of the Crystal Reports design application.

Figure 4.16 The executed resultset and preview of the report you have just created using the Standard Report Creation Wizard.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020