Mastering Crystal Reports 9 [Electronic resources]

Cate McCoyand, Gord Maric

نسخه متنی -صفحه : 217/ 129
نمايش فراداده

Chapter 18: The Object-Oriented Primer

Overview

Crystal Reports is a very powerful report-development tool. However, its power does not end as a stand-alone report writer. You can use Crystal Reports with a custom application or a web-based application to provide its report-writing power to the application.

Think of the tools in your garage. Each tool, such as hammer or screwdriver, can be used for a certain task, but on its own each is limited. Together the tools can be used to build houses or factories. Crystal Reports is like a toolbox with all the individual tools working together: a tool that connects to databases, a tool that formats sections, a tool that totals and subtotals your report, and a tool that creates graphics. Crystal Reports uses these tools to create the Crystal Report Writer.

Through program code we can access these Crystal Report tools so we can use them in our custom application. These tools are hidden away as objects. To make use of these objects, you will need to know the concepts of object-oriented programming (OOP).

Business Question: I need to use Crystal Reports inside a custom application but I don’t understand object-oriented concepts, and all the documentation and sample code seem to be object-oriented.

If you are familiar with OOP concepts, you can skip this chapter and move to the other chapters in this section. If you are not familiar with OOP concepts, this chapter will provide you the foundation you will need to understand OOP concepts so you can use Crystal’s objects in your applications. We will start by discussing programming concepts and show how they evolved to OOP concepts, and then we’ll show how to apply those concepts to Crystal Reports.

In this chapter, we will examine the following topics:

Explore the evolution of creating reusable programs

Explore a simplified object model

Differentiate among methods, properties, and events

Connect object-oriented Programming to Crystal Reports

Introduce Crystal Decisions’ object models