2 Introduction to Crystal Reports Allows you to produce the report you want from virtually any data source.Designed to help analyze and interpret important information.Used to produce simple, complex or specialized reports
3 Competency of Crystal Reports Create any report you can imagineCan be used for windows as well as web based applicationsRuntime Customization (Reports generated dynamically based on parameters/formulas)
4 Benefits of Crystal Reports XI R2 Improved usabilityExpanded Application Development CapabilitiesIntegration with Business Objects Enterprise XI R2
5 Phases of Report Design There are five phases of report design.Define the conceptSourcing the dataCreating the designDeveloping and testing the designDeploying and operating the report
6 Defining the concept Beginning with the end in mind Have some idea to the final report to look like(i.e a Prototype)Prototype can be a simple Crystal Report or Excel sheet or Word Document
7 Sourcing the data Determine where the data for your report resides (a database, file etc)Determine relations between dataA common problem here is that the data you want to include does not exist or relation do not exist
8 Creating the DesignThe best report is one that is completed on paper and is then recreated using Crystal ReportsRevisit your prototype and decide which of the fields in the report areDirectly from databaseCalculated from database fieldsFormula fields
9 Developing and Testing the Design Input your data and test the report on different platformsAny performance issues, revisit your report designCheck relations/constraints (for any cartesian)Check query for performance improvementPut option of Grouping on ServerEliminate Unused Formulas
10 Deploying and operating the report The last step in this process is to consider how your report is going to be usedWill it be exported ? If yes, where ?Excel (.xls)Word (.doc)Acrobat (.pdf)Rich Text Format (.RTF)XMLTextSeparated Values (.CSV)Will the generated report be mailed/stored in centralized location/web-based ?
11 Creating a ReportConnect to a data sourceConnect to databaseAdding tables & Linking TablesDefining the design environmentInserting objects on a reportPositioning and sizing objectsFormatting objectsPreviewing and saving the report
12 Opening Crystal Reports In windows click start, go to programs then select Crystal ReportsClick ‘Standard Report Wizard’ or ‘Blank Report’
14 Selecting Data (Continued) Standard Report creation wizard has five sections.Current connectionsList of currently connected data sourcesFavoritesList of commonly used data sources, maintained in favoritesHistoryList of the five recently used data sources
15 Selecting Data (Continued) Create New connectionShows sub folders for various data sources you can connect to.RepositoryContents of your repository through the Crystal Enterprise explorer
21 Design TabDesign Tab is the place where you do most of the initial work when creating the reportIt designates and labels the various part of the reportIt has the structure and instruction for creating the final report
22 Design Tab AreasCrystal Reports automatically creates five sections in the design tab when you begin creating the reportReport HeaderUsed for Report title and other information which you want to appear at the beginning of the reportPage HeaderInformation what you want to appear at the top of each pageDetailsBody of the ReportReport FooterInformation appear only once at the end of the reportPage FooterPage number and other information you want to appear on the bottom of each page.
24 Design Tab Areas (Continued) Two additional sectionsGroup HeaderHolds the Group name fieldPrinted once at the beginning of the groupGroup FooterHolds the summary valuePrinted once at the end of the group
25 Inserting Field Expand the Database field node Expand a table Click the field which you want to display in the reportDrag into Details section of the report
26 Inserting Field (Continued) Object Frame appears when you drag a field into the Report
27 Inserting Field (Continued) View of Design AreaInserted field
28 Resizing Field Click the field which you want to resize Move the cursor over the resizing handle until the cursor turns into a resizing cursorResize the field
36 Formatting Object Select the object which you want to format Right click and select format field from the drop down menuFormat Editor will openYou can change the format for the object- You can add borders, colors and shading to a field- You can add hyperlinks to the objects
39 Formatting Object (Continued) Use the Format Painter to copy absolute or conditional formatting properties from one report object to one or more target objects.Select a source object or field in your report and click Format Painter.Click the target object or field you want to apply the formatting to.
40 Record Selection Used to restrict the records in the report It is like a filter applied in reportClick Select Expert on the Expert Tools toolbarSelect the field to which you wish to restrict the data(Eg.Cutomer.Country)
41 Record Selection (Continued) Select the condition
42 Record Selection (Continued) Select the name of the countryThis selection will return only those records for which the country is equal to England
43 Deleting a FieldSelect the FieldPress Delete Key
44 Sorting Records Click Sort Record Expert Select the field on which you want to apply sortSelect sort directionSelect the fieldClickSelect the sort order
51 Exercise 1 Create a report using Blank Report Select Employee Table Select Employee ID,First name,Position,SalaryAdd Summary info for the reportGive Title to the reportGroup the report by Employee positionApply sort on Employee NameInsert image to the reportView the report
52 Report Creation Using Report wizard There are four report creation wizardsStandardCross-TabMail LabelOLAPClick any one on the start page as per your requirementThen it asks you to select the data
53 Report Creation Using Standard Report Wizard (Continued) Select Database
54 Report Creation Using Standard Report Wizard (Continued) Select Required FieldsClick
55 Report Creation Using Standard Report Wizard (Continued) Select the field on which you want to Group the Data
56 Report Creation Using Standard Report Wizard (Continued) Select the field to apply Summary Info in the Report
57 Report Creation Using Standard Report Wizard (Continued) Apply Group sorting If You need
58 Report Creation Using Standard Report Wizard (Continued)
59 Report Creation Using Standard Report Wizard (Continued) Apply Filter Condition, If required
60 Report Creation Using Standard Report Wizard (Continued) Select a Template
61 Locking an Object size and position Used to lock the position of the selected report objectSelect the object whose size and position you want to lockClick lock size/position button in the Formatting Toolbar
63 Making a Object Read-only (Continued) Right Click object you want to make read-only
64 Adding Lines to Report Click Insert Line on the insert Toolbar Use the pencil cursor to draw the line where required
65 Editing Lines on a Report Right click the Line you want to formatMakeDesireChanges
66 Adding Boxes to Report Click Insert Box Use the pencil cursor to draw the box where required
67 Adding Shapes to Report You can insert shapes such as circles,elipses and boxes with rounded cornersTo add shapes to your report, you need to add a boxRight click the box, then click Format BoxIn Format Editor Click the Rounding Tab
68 Adding Shapes to Report (Continued) Select a number or move the slider to the right to increase the curvature of the box corners until you obtain appropriate shape.
74 Hiding Report Sections Hide (Drill-Down OK)Hides the section when you run the reportSuppress (No Drill Down)Condition is applied by formulasSuppress Blank sectionHides a section whenever nothing is in it
75 SubReports A subreport is a report within a report Subreports are used toTo combine unrelated reports into a single reportTo coordinate data that cannot otherwise be linkedTo present different views of the same data within a single report.
76 Difference b/w Primary Report and SubReport Is inserted as an object into a primary reportCan be placed in any report sectionCannot contain another subreport.Does not have Page Header or Page Footer sections.
77 Click Report Wizard to create Sub Report Inserting SubReportsOn the insert menu Click SubreportInsert Sub Report NameClick Report Wizard to create Sub Report
84 Linking Tables (Continued) Auto LinkAutomatically chooses links for your tables based on common fields in tables or indexed fields (if your database supports indexed fields).Link Processing OrderSpecify the link processing order using Order Links option in the Database Expert.
95 Create a Cross-Tab Report from the available data source Exercise 4Create a Cross-Tab Report from the available data source
96 Parameter Fields Used to Prompt the user to enter the information Information entered by the user determines what appears in the reportParameter fields support the following data typesBooleanCurrencyDateDate TimeNumberStringTime
97 Creating Parameter Fields Make sure your report is in Design TabClick ‘Field Explorer’ on the Standard ToolbarSelect Parameters fields and click New
98 Creating Parameter Fields (Continued) Enter Parameter NameSelect a fieldClick Actions, Select Append All Database valuesEnter Prompt Text
99 Using Parameter Fields Select ‘Selection Expert’ on the Expert Tools menuIn the ‘Choose Field’ box select the fieldApply the condition on the field and select the parameter as the value
100 Running TotalRunning totals are totals that can be displayed on a record by record basisIt totals all records up to and including the current record.
101 Creating Running Total Field Select Running Total Fields in Field Explorer and Click New
103 Exercise 5 Create a report using Customer and Order Tables Include the fields Customer Name, Order ID,Order AmountCreate a Running total for Order Amount on the change of Order IDAdd Running total field in to design Area.View the Report
104 Creating Report Alerts Select Alerts on the Report Menu then Click Create or Modify Alert
105 Creating Report Alerts (Continued) Name the alert.Create the message you want to appear when the alert is triggered (optional).Define the condition that triggers the alert.
107 Exercise 6 Create a Report using Customer Table Include Country, Last Year’s sales, CityCreate a Alerter to indicate the countries with last year’s sales greater than $15000
108 Dynamic and Cascading Prompts Prompt values can be populated from values in DatabasePrompts can be arranged in a cascade, where one value in the prompt constraints values in subsequent pick listsReport designers no longer maintain static prompt lists in individual reports. A single prompt definition can be stored in the repository and shared among multiple reports, improving both runtime scalability and design-time productivity
109 Creating Dynamic and Cascading Prompts Open the sample report called Group.rpt
110 Creating Dynamic and Cascading Prompts (Continued) Click Field ExplorerSelect parameter Fields and then Click New
111 Creating Dynamic and Cascading Prompts (Continued) From the List of Values, select DynamicFrom the Value List, select country
112 Creating Dynamic and Cascading Prompts (Continued) Click the blank field under country and select regionClick the blank field under region and select cityIn the parameter binding area, click country and Region to clear the binding (only the field associated with the City value should be bound).
113 Creating Dynamic and Cascading Prompts (Continued) Click Selection ExpertSelect City in the choose expert boxAssign a condition and select the dynamic prompt from the values list
114 Creating Dynamic and Cascading Prompts (Continued) Select the values for the Prompt and then Click OK
115 RTF Export FormatThis is optimized for ease of editing the files that it generatesIn the File Menu Select ‘Export’ and click on ‘Export Report’Select Editable (RTF) from the drop downSelect location to store the report
116 RTF Export Format (Continued) Select the Options as you needSelect the location where you want to save
117 Parameterized Sorting Group sort order can now have their sort values driven by formulaThis feature allows you to use parameters to control sort order
118 Creating Parameterized Sorting Create a simple report with the country, Region and City field from the Customer Table in the Xtreme sample Database 11
119 Creating Parameterized Sorting (Continued) Create a parameter called Sort Order that has two values: Ascending and Descending
120 Creating Parameterized Sorting (Continued) On the insert Menu Click Group and select the field that you want to group on( Ex: Country)Select Use a formula as Group Sort OrderClick the Conditional formula button
121 Creating Parameterized Sorting (Continued) In the Formula Workshop enter your conditional formula text
122 Creating Parameterized Sorting (Continued) When you prompted to select a Sort Order, select the Option that you want , and click OK.
123 Creating Parameterized Sorting (Continued) Now the Report appears with groups for the field that you selected in the Insert Group Dialog box and sorted in the order that you selected in your parameter prompt.
124 HTML PreviewCrystal reports can now be previewed in HTML format thus showing how reports will look when published to the webIn Crystal Reports design environment an additional VIEW tab is added to support this functionalityThe advantage of this feature is time saved in iterative task of publishing reports to the web as they are designed
125 Updated Repository Explorer The new repository Explorer makes it easier to navigate within the Business Objects Enterprise systemBetter able to share reporting components with other users through the repository
127 Updated Repository Explorer (Continued) Give User Name and Password Credentials
128 WorkbenchLets you keep Projects organized and allows you to group reports in folders according to your preference
129 Business Objects Universes Crystal reports based on Business Objects Universes can now support Universe run-time security and union queriesThese enhancements allow for most overloads defined in the Universe to be supported in Crystal reports
130 Creating Reports from Business Objects Universes Go to Standard Report wizardCreate New ConnectionUniverses Make New Connection Double Click
131 Creating Reports from Business Objects Universes (Continued) Select the objects whatever you want in to the Result Objects Pane and Query Filters then say OK
132 Creating Reports from Business Objects Universes (Continued) Select the Query in to the Selected Tables
133 Creating Reports from Business Objects Universes (Continued) Your Report will looks like in the below Screenshot
135 Multi-Pass Reporting Process of the Crystal Reports Engine The model determines the order in which data is accessed and manipulated during Report generation.Crystal reports uses “Three Pass” Reporting Methodology to generate reports.Understanding Report Processing Model facilitates, effective report design and faster debugging.
136 What is a “Pass”?A pass is a process that Crystal Reports uses each time the data is read or manipulated.Depending on the complexity of the report, Crystal Reports may make 1, 2, or 3 passes over the data.
137 Report Processing Crystal Reports Processing Engine – Pre-Pass # 1: Evaluation Time – “Before Reading Records”Constant FormulasCrystal Reports Processing Engine – Pass # 1:Evaluation Time – “While Reading Records”Database connection and Record retrievalRecurring formulasLocal Record SelectionSorting, Grouping & SummarizingSaved data storage