crystal reports sharpen your superhero powers (michitsch systems bcit)

81
Sharpen your Superhero Powers Cathy Michitsch, CRCP, Michitsch Systems / BCIT

Upload: sunilchowdary5194

Post on 08-Apr-2015

95 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Sharpen your Superhero Powers

Cathy Michitsch, CRCP, Michitsch Systems / BCIT

Page 2: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 2

Breakout Information (Hidden Slide)

Sharpen your Superhero PowersNeed your Crystal reports to really stand out and leap tall buildings in a single bound? Looking for more tricks to help you battle all the evil report requests that pile up on your desk? Join us for an Advanced Crystal Reports design session to see a variety of reports built by "super" users who've pushed Crystal Reports to the limit. See the "power" of conditionally formatting a crosstab. Learn how to "speed" up processing by using arrays instead of sub-reports. Find out how to build a chart that includes "invisible" data. Learn how to "mesmerize" through exciting drill-down reports with conditional formatting techniques. Attend this session to push your report design powers to the limit.

Room 2020, Tuesday, November 7, 1:45pm -2:45pmAlso Room 2007, Wednesday, November 8, 9:45am -10:45am

B1_ID81_Q350

Page 3: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 3

IntermediateCharting on “Invisible” DataDrill Down & Underlay Conditionally Formatting Crosstabs

AdvancedWrapping CrosstabsDynamic Crosstab LegendsDynamic Cascading Prompt MagicArray Replacement for SubReportsDo It Yourself Multi-pass Reporting

Q&A

Topics

Page 4: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 4

Review each employee’s order totals for a yearProduce a bar chart to show the sales by employee

Issue: show each employee on the chart even if they had no sales

Intermediate: Charting on “Invisible” Data

Task:

Page 5: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 5

Intermediate: Charting on “Invisible” Data

$134,374.05$511,745.82$29,016.94Dodsworth

$137,920.32$450,705.03$71,701Davolio

000Buchanan

000Brid200520042003Employee

Employee sales per year

Brid & Buchanan are not Sales Representatives in the Xtreme Database, this is for illustration purposes only

Filter on any year and Brid & Buchanan become “Invisible”

Page 6: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 6

Intermediate: Charting on “Invisible” DataChart that shows data using a Left Outer Join and filtered on the year of the orders – “invisible employees!”

Page 7: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 7

The join happens before the filteringThe link is on the employee IdsNo employee Id exists in the orders table for Brid and BuchananTherefore no data to show

Need the filtering PER table to occur BEFORE the joinsAll employees from one tableAll orders summed by employee from the orders tableTHEN link the two tables

Intermediate: Charting on “Invisible” DataWhy we lose the employees that had no sales in chosen year

Page 8: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 8

Main report showing the employees and a sub-report with the orders that belong to employees and show no sub-report when the employee ID doesn’t link

SQL command with two SELECT statements and a Left Outer Join (using a sub-query)

SQL command using a union statement to collect all the employees from one table and all theorders from the order table and show Null for “invisible” employees

Filtering after the join (year of order date isNull (0))

Intermediate: Charting on “Invisible” Data

Four different possible solutions for consideration:

Page 9: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 9

Intermediate: Charting on “Invisible” DataFiltering after the join (year of order date isNull (0)) solution

Page 10: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 10

Intermediate: Charting on “Invisible” Data

Chart that shows employees even if they don’t have sales!

Page 11: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 11

IntermediateCharting on “Invisible” DataDrill Down & UnderlayConditionally Formatting Crosstabs

AdvancedWrapping CrosstabsDynamic Crosstab LegendsDynamic Cascading Prompt MagicArray Replacement for SubReportsDo It Yourself Multi-pass Reporting

Q&A

Topics

Page 12: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 12

Drill down on employee photos like a web pageTwo employee photos per row to eliminate extra ‘white space’Employee summary Information to showDrill down on employee photo to see the details

Intermediate: Drill Down and UnderlayTask

Page 13: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 13

1. Put the photo (blob field) in a Group Header

2. Put the Group Header name field on top and stretched across the blob field

3. Suppress the Group Header name field

4. In preview mode double click on photo to drill down to details

How to drill down on a photo

Design

Preview

Intermediate: Drill Down and Underlay

Page 14: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 14

5. Place in detail fields and summary Field6. Use Underlay for the Group Header #1b section for the

details to show beside the photo.

Intermediate: Drill Down and Underlay

Page 15: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 15

7. Place detail headers in Group Header8. Suppress on DrillDownGroupLevel <>1 for each Header

Intermediate: Drill Down and Underlay

Page 16: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 16

9. Have the Report Option of Show All Headers on Drill Down turned on

Intermediate: Drill Down and Underlay

Page 17: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 17

10. Format Groups with multiple column should be checkedIntermediate: Drill Down and Underlay

Page 18: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 18

10. Put a Page Footer in big enough to even out columns in preview mode

11. Suppress it when the PageNumber = TotalPageCount

Intermediate: Drill Down and Underlay

Page 19: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 19

12. Preview report and double click on any employee’s photo to drill down to their detail information

Intermediate: Drill Down and Underlay

Page 20: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 20

IntermediateCharting on “Invisible” DataDrill Down & UnderlayConditionally Formatting Crosstabs

AdvancedWrapping CrosstabsDynamic Crosstab LegendsDynamic Cascading Prompt MagicArray Replacement for SubReportsDo It Yourself Multi-pass Reporting

Q&A

Topics

Page 21: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 21

Various ways to highlight cellsHighlight expertConditional formatting

Intermediate: Conditionally Formatting Crosstabs

Task: highlight a Crosstab cells to draw attention to

a specific cell, row, or a column

Page 22: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 22

Intermediate: Conditionally Formatting CrosstabsVarious ways to highlight cells

Use the Highlight Expert on cell

Page 23: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 23

Intermediate: Conditionally Formatting CrosstabsVarious ways to highlight cells

Conditional formatting on a Crosstab cell using GridRowColumnValue function

Page 24: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 24

Intermediate: Conditionally Formatting CrosstabsCrosstab formatting

Final results (see sample report)

Page 25: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 25

IntermediateCharting on “Invisible” DataDrill Down & UnderlayConditionally Formatting Crosstabs

AdvancedWrapping CrosstabsDynamic Crosstab LegendsDynamic Cascading Prompt MagicArray Replacement for SubReportsDo It Yourself Multi-pass Reporting

Q&A

Topics

Page 26: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 26

Advanced: Wrapping CrosstabsTask: How to make Crosstabs “wrap” to avoid whitespaces and jumping to the next page

Page 27: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 27

Advanced: Wrapping Crosstabs1. SQL command must have data summarized and sorted

Page 28: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 28

Advanced: Wrapping Crosstabs

2. Each region formula:

While reading records, set your formula to increment regions by 1 as a counter

Page 29: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 29

Advanced: Wrapping Crosstabs

3. Set the second formula using EvaluateAfter Function to group on each region and calculate out when to “wrap”(after 6 regions)

Page 30: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 30

Advanced: Wrapping Crosstabs4. Create two groups onCountry and the @GroupRegions

formula and place the Crosstab in the Group Header

(Include the fields in details for testing purposes)

Page 31: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 31

Advanced: Wrapping Crosstabs

If you want to do this for multiple countries, you need to placeCrosstab in a sub-report and process a sub-report per country Otherwise the final result of this simple wrapping example is:

Page 32: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 32

IntermediateCharting on “Invisible” DataDrill Down & UnderlayConditionally Formatting Crosstabs

AdvancedWrapping CrosstabsDynamic Crosstab LegendsDynamic Cascading Prompt MagicArray Replacement for SubReportsDo It Yourself Multi-pass Reporting

Q&A

Topics

Page 33: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 33

Advanced: Dynamic Crosstab Legends

To have a crosstab legend dynamically change based on data, for example: Nancy Davolio’s column header is now red and the legend shows red:

Task

Page 34: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 34

Advanced: Dynamic Crosstab Legends

1. Use conditional formatting on the column header cell, background colour, to display colour and basically tofill the arrays:

Page 35: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 35

Advanced: Dynamic Crosstab Legends

1. Use conditional formatting on the column header cell, background colour, to display colour and basically tofill the arrays:

Page 36: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 36

Advanced: Dynamic Crosstab Legends

2. Calculate how big the array will be and prepare arraysto pass to subreport

Page 37: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 37

Advanced: Dynamic Crosstab Legends

3. Create a subreport using a Top(N) command object

-- (see knowledge base # C2012542 for more details

on how to pass print time data to a subreport)

-- Tip use Top(N) command object – used to pre-filter data so we don’t have to do any out of bounds error checking

Page 38: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 38

Advanced: Dynamic Crosstab Legends

4. Link Subreport to main report

Page 39: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 39

Advanced: Dynamic Crosstab Legends

5. In subreport pivot data to show as rows of data

Page 40: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 40

Advanced: Dynamic Crosstab Legends

6. Display legend names and colour in details

Page 41: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 41

Advanced: Dynamic Crosstab Legends

7. Run the report

Colours from background RGB number from the linked array values

Page 42: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 42

IntermediateCharting on “Invisible” DataDrill Down & UnderlayConditionally Formatting Crosstabs

AdvancedWrapping CrosstabsDynamic Crosstab LegendsDynamic Cascading Prompt MagicArray Replacement for SubReportsDo It Yourself Multi-pass Reporting

Q&A

Topics

Page 43: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 43

Advanced: Dynamic Cascading Prompt (DCP) MagicTask: helping users know which prompt value topick if confusing levels of cascading prompts exist.

Using Dynamic Cascading prompts is very powerful in Crystal Reports XI allowing report users to see only the values linked to each parameter level.

This example shows parameters on the country, region and city. Users are allowed to pick <All> as a value for any of these parameters or a specific country, region, or city.

Challenge for the user, what if they do not know the country or region that the city is in? Do they guess? Or run the full report (which could take hours) just to find the country, region, and city (cities) they want to report on?

Page 44: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 44

Advanced: Dynamic Cascading Prompt (DCP) Magic

Technical challenge

How to show the user,DYNAMICALLY, which city belongs to which region and country in a parameter drop down list, dependent on values in the data source.

Page 45: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 45

Advanced: Dynamic Cascading Prompt (DCP) MagicTheory: Use a second Crystal Report to create command object

Use Crystal Reports to build a separate dynamic command object that can be used with ALL the combinations of the values from the data source

Cut and paste this commandinto your live report

This sample report is included online and is called the DCP_Flexible-All-Command-Maker.rpt.It is described in your handout.

Page 46: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 46

Advanced: Dynamic Cascading Prompt (DCP) MagicSteps

1. Reset the SQL statement formula before you begin

Page 47: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 47

Advanced: Dynamic Cascading Prompt (DCP) Magic

2. Create your Parameter fields to get the field names, field types, and table name to be used in the command object

Field names and field types prompts allow multiple values, table name is discreet with no multiple values

Page 48: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 48

Advanced: Dynamic Cascading Prompt (DCP) Magic

Example when setting up for country, region and city combinations

Page 49: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 49

Advanced: Dynamic Cascading Prompt (DCP) Magic

3. Create placeholder formulas joining the parameter values together for the field names and field types

Page 50: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 50

Advanced: Dynamic Cascading Prompt (DCP) Magic

4. Put these fields in the Report Header

Page 51: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 51

Advanced: Dynamic Cascading Prompt (DCP) Magic

5. Calculate out the Binary Combination of Field Names based on the number of records using a Custom Function of Decimal to Binary function (review in sample report)

000001010, etc

Page 52: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 52

Advanced: Dynamic Cascading Prompt (DCP) Magic

6. Build the layers of the union statements based on the Binary Combinations

Page 53: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 53

Advanced: Dynamic Cascading Prompt (DCP) Magic

7. Add in the carriage returns and line feeds

Page 54: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 54

Advanced: Dynamic Cascading Prompt (DCP) Magic

8. Show the SQL command

Page 55: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 55

Advanced: Dynamic Cascading Prompt (DCP) MagicSteps (#1 - #8 in handout)

9. Run the report to generate the SQL commandCut the SQL statement generated and paste it into a Command object of a new Crystal Report and dress it up with concatenated fields!

Page 56: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 56

Advanced: Dynamic Cascading Prompt (DCP) Magic

10. In the new report, add in your other tables or command objects but do NOT link them although the following messages will appear:

Page 57: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 57

Advanced: Dynamic Cascading Prompt (DCP) Magic

11. In new report, create formulas for each of the parameter levels (dependent on how you want to show the concatenation of the parameter values)

Page 58: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 58

Advanced: Dynamic Cascading Prompt (DCP) Magic

12. Use formulas and parameters in your selection formula

Page 59: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 59

Advanced: Dynamic Cascading Prompt (DCP) Magic

13. Run your report and check out the dynamic cascading prompts!

Page 60: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 60

IntermediateCharting on “invisible” dataDrill Down & UnderlayConditionally Formatting Crosstabs

AdvancedWrapping CrosstabsDynamic Crosstab LegendDynamic Cascading Prompt MagicArrays Replacement for SubreportsDo it yourself Multi-pass Reporting

Q&A

Topics

Page 61: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 61

Advanced: Arrays Replacement for Subreports

Task: To calculate the sum of sales > $5,000 for each

Employee and chart on it without using a Subreport

By-passing the DBA concept:

Pre-process and pre-calculate data, before the Crystal data engine “receives it” without using Stored Procedures / Views, etc, to prepare data that would not normally be available at read time.

Page 62: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 62

Advanced: Arrays Replacement for Subreports

Page 63: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 63

Advanced: Arrays Replacement for Subreports

Reading a single dataset twice as shown by the ReadTime Record Count compared to the records filtered by record selection.

Page 64: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 64

Advanced: Arrays Replacement for Subreports

The While Reading Records (WRR) formula has the same end results the as the running total, but is finalized pre-printtime, and because of the >$5000 condition is it different from a standardSUM.

Page 65: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 65

Advanced: Arrays Replacement for Subreports

1. Create a command that gets two distinct records ('a‘ vs 'b')

Steps

Page 66: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 66

Advanced: Arrays Replacement for Subreports

2. Link it to the primary table as a Inner != Enforced Join(this is what actually causes the replication to occur)

Page 67: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 67

Advanced: Arrays Replacement for Subreports

3. Separate the record selection into “category b” and areference-able record selection formula.

Note: the “@Record Selection” formula will most likely still goserver-side as a WHERE clause in newer versions of Crystal Reports.

* Category B is the second pass of data that we actually want in the report.

Page 68: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 68

Advanced: Arrays Replacement for Subreports

4. Create a ReadTime “conditional manual running total”

Page 69: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 69

Advanced: Arrays Replacement for Subreports

5. In pass “b” simply output the corresponding results of pass “a”

Page 70: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 70

Advanced: Arrays Replacement for Subreports

6. Insert a standard chart being sure to select “Don't summarize”as the final value(s) are already summarized.

Results! :

Page 71: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 71

IntermediateCharting on “invisible” dataDrill Down & UnderlayConditionally Formatting Crosstabs

AdvancedWrapping CrosstabsDynamic Crosstab LegendsDynamic Cascading Prompt MagicArray Replacement for SubReportsDo It Yourself Multi-pass Reporting

Q&A

Topics

Page 72: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 72

Advanced: Do It Yourself Multi-pass Reporting

To see the status of an order on a various datesThe order is usually only read once and therefore would show up on the report only once, but we want to show the order multiple times like below:

Task

Order ID Order Date Date “Walker” Shipped Date Status

Page 73: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 73

Advanced: Do It Yourself Multi-pass ReportingOr .. group on the date and have the records read more than once!

Page 74: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 74

Advanced: Do It Yourself Multi-pass Reporting

1. Add a new Datasource from the Xtreme Database (orders table for this example)

Page 75: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 75

Advanced: Do It Yourself Multi-pass Reporting

2. Add a new datasource (command object) to your report for 31 replications of the data (aka 1 month):

Page 76: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 76

Advanced: Do It Yourself Multi-pass Reporting

3. Link the IntLink field with the original datasource– Make sure the new command is on the RIGHT when linking for

this example (makes a difference)– Set the link type to “NOT EQUAL” and click OK (ignore the

datasource warning)

Page 77: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 77

Advanced: Do It Yourself Multi-pass Reporting

4. Create a “Date Walker” formula to add 1 to the order date to increment by each day

Note: This formula is 100% dependent on the order of the tables (collating)

Page 78: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 78

Advanced: Do It Yourself Multi-pass Reporting5. Create a “status” formula calculate the status based on

the date of the “Date Walker” against the Shipped Date

Page 79: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 79

Advanced: Do It Yourself Multi-pass Reporting

6. Run the report (this version is showing sorted by order Id)

Page 80: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 80

Advanced: Do It Yourself Multi-pass Reporting

7. Or run the report grouped and sorted by date!

Page 81: Crystal Reports Sharpen Your Superhero Powers (Michitsch Systems BCIT)

Copyright © 2006 Business Objects S.A. All rights reserved.Slide 81

QuestionsCathy Michitsch, CRCP• President, Michitsch Systems Inc.• Instructor, British Columbia Institute of Technology

Contact information (optional)Email: [email protected]: 604.876.9204 x201

Q&A