• Gefällt mir
Business objects integration kit for sap   crystal reports 2008
Nächste SlideShare
Wird geladen in ...5
×

Business objects integration kit for sap crystal reports 2008

  • 2,004 Views
Hochgeladen am

 

Mehr in: Technologie
  • Full Name Full Name Comment goes here.
    Sind Sie sicher, dass Sie...
    Ihre Nachricht erscheint hier
    Hinterlassen Sie den ersten Kommentar
    Be the first to like this
Keine Downloads

Views

Gesamtviews
2,004
Bei Slideshare
0
Aus Einbettungen
0
Anzahl an Einbettungen
0

Aktionen

Geteilt
Downloads
94
Kommentare
0
Gefällt mir
0

Einbettungen 0

No embeds

Inhalte melden

Als unangemessen gemeldet Als unangemessen melden
Als unangemessen melden

Wählen Sie Ihren Grund, warum Sie diese Präsentation als unangemessen melden.

Löschen
    No notes for slide

Transcript

  • 1. BusinessObjects Integration Kit for SAP - Crystal Reports 2008Applies to:Crystal Reports 2008, BusinessObjects Integration Kit for SAP SolutionsSummaryThis document outlines the required steps to install and configure BusinessObjects Enterprise in combinationwith SAP NetWeaver BI.Author: Ingo HilgefortCompany: Business Objects, an SAP companyCreated on: 01 October 2008Author BioIngo Hilgefort started in 1999 with Seagate Software / Crystal Decisions as a Trainer and Consultant.He moved to Walldorf for Crystal Decisions by end of 2000 and worked with the SAP BI Development teamon integrating Crystal Reports with SAP BW. He then relocated to Vancouver in the year 2004 and workedas Product Manager / Program Manager (Engineering) on the integration of Business Objects products withSAP products.He is now focusing on the topic of Embedded Analytics for the SAP Solutions.SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 1
  • 2. BusinessObjects Integration Kit for SAP - Crystal Reports 2008Table of ContentsSAP as a Datasource for Crystal Reports ..........................................................................................................3SAP BW Metadata in Crystal Reports ................................................................................................................4 Dimension and Characteristics .......................................................................................................................5 Display attributes and Navigational Attributes ................................................................................................7 Keyfigures, Units, and Currencies ..................................................................................................................9 Hierarchies ....................................................................................................................................................10Crystal Reports with simple SAP BW queries ..................................................................................................11 Creating Crystal Reports Using the SAP Toolbar.........................................................................................11 Creating Crystal Reports Using the Database Explorer ...............................................................................15Creating your First Report with Crystal Reports on Top of SAP BI ..................................................................22 Insert a Field .................................................................................................................................................26 Insert Additional Fields..................................................................................................................................27 Preview the Report........................................................................................................................................28 Resize Fields.................................................................................................................................................30 Change Field Headings.................................................................................................................................31 Add Summary Information ............................................................................................................................31 Add a title ......................................................................................................................................................33 Format an Object ..........................................................................................................................................34 Grouping & Charting .....................................................................................................................................36 Save the Report ............................................................................................................................................38Creating your First Report with Hierarchies from SAP BI.................................................................................39 Formulas for Hierarchical Reporting .............................................................................................................48 Formula Hierarchy Level ............................................................................................................................................48 Count Hierarchical Children .......................................................................................................................................48 Conditional Formatting with Hierarchy Level ................................................................................................49Copyright...........................................................................................................................................................52SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 2
  • 3. BusinessObjects Integration Kit for SAP - Crystal Reports 2008SAP as a Datasource for Crystal ReportsThe available SAP data sources for Crystal Reports are:SAP R/3 • Tables and cluster (Open SQL). • ABAP functions. • Classic InfoSets. • SAP queries and InfoSet queries.SAP BW • Tables and cluster (Open SQL). • ABAP Functions. • Direct ODS access (without the need for an SAP BW query). • BW queries and BW cubes.SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 3
  • 4. BusinessObjects Integration Kit for SAP - Crystal Reports 2008SAP BW Metadata in Crystal ReportsWhen connecting to a SAP BI query with Crystal Reports the underlying metadata from the SAP BI query isleveraged and matched to Crystal Reports elements.The table below shows how SAP BI metadata is used in Crystal Reports. BW Query element Crystal Reports designer element Characteristic Separate fields for key and description per characteristic. Hierarchy Fields representing a parent-child relationship. Keyfigure Measure element in a grouping called Keyfigure. Each Keyfigure can have up to three elements: numeric value, unit, and formatted value. Calculated Keyfigure Measure element in the folder Keyfigure. (Information about the details of the calculated keyfigure is not available in Crystal Reports.) Restricted Keyfigure Measure element in the folder Keyfigure (Information about the details of the restricted keyfigure is not available in Crystal Reports.) Filter Filters will be applied to the underlying query but are not visible in the Crystal Reports designer. Navigational attribute Separate fields for key and description per navigational attribute. Display attribute Each display attribute becomes one field in the field explorer. The display attributes are grouped together with the actual characteristic. SAP variables Parameters.SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 4
  • 5. BusinessObjects Integration Kit for SAP - Crystal Reports 2008Dimension and CharacteristicsThe image shows an SAP BI query in the BEx Query Designer.The rows of this query include several characteristics and the columns several keyfigures. On the left side,the actual cube structure is shown with the cube dimensions (not to be confused with characteristics).SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 5
  • 6. BusinessObjects Integration Kit for SAP - Crystal Reports 2008Building a Crystal Report on top of such an SAP BW query will result in the following elements:• Each characteristic in the query will result in an element in the field explorer with a key and a description item (Example: City Key and City Name).• In addition each characteristic will also generate a Node ID and a Parent Node ID which can be used for hierarchical reporting.• Each characteristic will also generate a Member Unique Name field which represents the technical key value.SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 6
  • 7. BusinessObjects Integration Kit for SAP - Crystal Reports 2008Display attributes and Navigational AttributesDisplay attributes are InfoObjects which are logically assigned or subordinated to a characteristic.For example:The characteristic customer has two attributes:• Phone number• Fax numberThe following screen shows an SAP BI query in the BEx Query Designer.The row structure includes a characteristic Customer with four display attributes (Geographical Height,Postal Code, Sector Code, and Area Code).SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 7
  • 8. BusinessObjects Integration Kit for SAP - Crystal Reports 2008In addition the BW query contains three navigational attributes in the rows: Regional Code, Postal Code, andArea Code. A navigational attribute can easily be identified by the double underscore (“__”) in the technical name of the navigational attribute.Building a Crystal Report object on top of such an SAP BW query will result in the following elements:• Each characteristic in the query will result in an element in the field explorer with a key and a description field.• Each navigational attribute in the query will result in an element in the field explorer with a key and a description item (for example, Regional Code and Area Code).• Each display attribute will create an element in the field explorer underneath the corresponding characteristic (for example, Customer number with several display attributes).• Crystal Reports will include all available display attributes for the characteristic and not only the display attributes that are included in the SAP BW query.SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 8
  • 9. BusinessObjects Integration Kit for SAP - Crystal Reports 2008Keyfigures, Units, and CurrenciesEach keyfigure used in an SAP BW query can have up to three elements:• Numeric value of the keyfigure.• Unit or currency information.• Formatted value, representing the user-specific formatting.The image shows the result of two keyfigures in Crystal Reports:• Each keyfigure is represented with a field in a group called Key Figures.• In the case the keyfigure is configured in SAP BW with a unit, an additional field will be added representing the unit information.• The Formatted Value represents the numeric value formatted as a string value following the user- specific formatting settings.SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 9
  • 10. BusinessObjects Integration Kit for SAP - Crystal Reports 2008HierarchiesHierarchies can be activated for characteristics in the BEx Query Designer and offer the user the capability tonavigate along a hierarchical structure.The image shows the field explorer in Crystal Reports based on an SAP BW query with a hierarchy.• A hierarchy results in a parent-child relationship.SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 10
  • 11. BusinessObjects Integration Kit for SAP - Crystal Reports 2008Crystal Reports with simple SAP BW queriesCreating Crystal Reports Using the SAP ToolbarThe SAP specific toolbar and the SAP specific menu items offer the user the typical SAP open and savedialogs that are also used in the Business Explorer and allow the user to store the Crystal Report objectdirectly into SAP BW roles.The following table shows all available menu options of the SAP toolbar:Button Command Function Create a new report Creates a new report based on an SAP BW query that is from SAP BW Query already defined. Open Report Opens a Crystal Report file from SAP BW. Save Report Saves the current report to SAP BW. Save Report as Saves the report to BW with the option to define a new name or choose a different SAP BW role. Start SAP BW Query Starts the SAP BW Query Designer. Designer Disconnect Closes the current connection to SAP BW. Settings Allows configuring settings for the connectivity to SAP BW. The settings are specific for the Crystal Reports designer installation.SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 11
  • 12. BusinessObjects Integration Kit for SAP - Crystal Reports 2008As part of the settings available in the SAP toolbar the report designer can choose to use the SAP BW MDXdriver for creating new reports against SAP BW. It is highly recommended to use the BW MDX driver. The BW Query driver does not support multiple structures of a BW query and does not support display attributes.SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 12
  • 13. BusinessObjects Integration Kit for SAP - Crystal Reports 2008To create a new report with the SAP toolbar1. Start Crystal Reports Designer (Start > Programs > Crystal Reports 2008 > Crystal Reports 2008).2. Select the menu SAP > Settings.3. Set the check box Use MDX Driver with support for Multiple structures.4. Click OK.5. Select the menu SAP > Create New Report from a Query.6. Select the SAP server from the SAP Logon.7. Click OK.8. Enter the needed details: Client, User, Password, and Language.9. Click OK.SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 13
  • 14. BusinessObjects Integration Kit for SAP - Crystal Reports 2008 The SAP standard open/save dialog will show up and offer the user to select a query from the roles or InfoAreas.10. Select the SAP BW query.11. Click OK. An empty report is created and the SAP BW query is used as data source.12. Select the fields for your report from the Field Explorer.13. Preview your report.14. Save the report to BusinessObjects Enterprise.SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 14
  • 15. BusinessObjects Integration Kit for SAP - Crystal Reports 2008Creating Crystal Reports Using the Database ExplorerCrystal Reports lists the two SAP BW query connectivity in the standard Database Explorer.To create a new report with the Database Explorer1. Start Crystal Reports Designer (Start > Programs > Crystal Reports 2008 > Crystal Reports 2008).2. Select the menu File > New > Standard Report.3. Double-click on Create New Connection. The SAP connectivity is listed as part of all available connectivity – sorted alphabetically.4. Double-click SAP BW MDX Query. The SAP BW MDX Query connectivity is the more enhanced version of the Crystal Reports connectivity towards SAP BW cubes and SAP BW queries.SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 15
  • 16. BusinessObjects Integration Kit for SAP - Crystal Reports 20085. Select the SAP server from the list of available SAP systems.6. Click Next.7. Enter Client, Username, and Password.8. Click Finish.SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 16
  • 17. BusinessObjects Integration Kit for SAP - Crystal Reports 20089. Click Finish.10. Right-click the SAP server entry.11. Select the menu entry Options.12. Enter the filter in the field Table name LIKE.13. Click OK.SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 17
  • 18. BusinessObjects Integration Kit for SAP - Crystal Reports 200814. Double-click the QC (Queries) entry.15. Select the SAP BW query from the list of available queries16. Click the right arrow to move the query to the list of selected queries.17. Click Next.SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 18
  • 19. BusinessObjects Integration Kit for SAP - Crystal Reports 200818. Select the needed fields and click the right arrow.19. Click Next.SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 19
  • 20. BusinessObjects Integration Kit for SAP - Crystal Reports 200820. If required, define grouping by selecting the field and clicking the right arrow.21. Click Next.22. If required, define a record selection.23. Click Next.SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 20
  • 21. BusinessObjects Integration Kit for SAP - Crystal Reports 200824. Click Finish.SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 21
  • 22. BusinessObjects Integration Kit for SAP - Crystal Reports 2008Creating your First Report with Crystal Reports on Top of SAP BIFor this report I am using a SAP BI Query based on the cube 0D_DX_C01 (Demo Scenario DalSegnoCompany) with the following characteristics: o Calendar Year o Calendar Year / Month o Product Group o Product o Distribution ChannelAnd the following keyfigures o Billed Quantity o Net SalesSAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 22
  • 23. BusinessObjects Integration Kit for SAP - Crystal Reports 2008 1. Select Start All Programs Crystal Reports 2008 Crystal Reports 2008 to start Crystal Reports. The SAP toolbar will appear on the left of the Start Page display. 2. In the SAP menu, select Settings. The Settings dialog appears. 3. Select Use MDX driver with support for Multiple structures and select OK.SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 23
  • 24. BusinessObjects Integration Kit for SAP - Crystal Reports 2008 4. Now you want to change the Initial Setup and show only the description of the characteristic and the key figures of the BEx query. 5. Select the menu File > Options > Database and set the option “‘Show Description’ Now the Field Explorer will show SAP metadata instead of the technical name for the fields.SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 24
  • 25. BusinessObjects Integration Kit for SAP - Crystal Reports 2008 6. In the SAP toolbar, select Create new report from a query. The SAP System dialog appears. 7. Select the system and click Next. 8. Select Roles. Expand the folder and select the query.SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 25
  • 26. BusinessObjects Integration Kit for SAP - Crystal Reports 2008Insert a Field 9. Expand the Database Fields node in the Field Explorer dialog. 10. Drag Product Group into the Details section of the Design tab. An object frame appears with the Arrow cursor as you drag the field onto the report: The object frame represents the object you have just selected for placement. The size of the object frame approximates the size of the data in the field selected. Move the object frame as far to the left as you can in the Details section. If you move the field too far to the left, the Arrow cursor turns into a Stop cursor, indicating that you cannot drag the field that far. Keep in mind that you cannot place any objects outside the page margin. The Design tab should look similar to this:SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 26
  • 27. BusinessObjects Integration Kit for SAP - Crystal Reports 2008Insert Additional Fields 11. Drag Product (SAP Demo) into the Details section of the Design tab to the right of Product Group. Note: To select multiple fields, use the Ctrl-click combination to select a non-continuous range of fields. Use the Shift-click combination to select several fields from the list that are contiguous. The fields appear in the Details section of the report in the same order as in the Field Explorer dialog box. 12. Expand the Key Figures entry. Drag the Net Sales Value field to the right of Product (SAP Demo). In the Field Explorer dialog box, the system indicates which items have been selected by placing a check mark ( ) on the fields used. The Design tab should look similar to this:SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 27
  • 28. BusinessObjects Integration Kit for SAP - Crystal Reports 2008Preview the Report 13. Click Print Preview on the Standard toolbar (or View Print Preview in the menu) to activate the Preview tab. The Enter Values dialog appears. Note: The first time you preview a report, you must select Print Preview to activate the Preview tab. The Preview tab appears to the right of the Design tab. You can then switch between designing and previewing the report by clicking the corresponding tab. 14. Use the Shift-click combination to select the Bag & Outdoor, Accessories, and Office product groups in the Available Values list. Select the > button to transfer these values to the Selected Values list and select OK.SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 28
  • 29. BusinessObjects Integration Kit for SAP - Crystal Reports 2008 The system populates the Preview tab based on your selections. The screen should look similar to this:SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 29
  • 30. BusinessObjects Integration Kit for SAP - Crystal Reports 2008Resize Fields 15. You can see that the Net Sales field is too small. Return to the Design tab to resize the field. 16. Click the Net Sales field in the Details section to select it. Press the Ctrl key and click the field heading to select both objects. 17. Move the cursor over the resizing handle on the right edge of the fields until the cursor turns into a Resizing cursor. Resize the fields to the right until they are approximately 1.5 inches in length.SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 30
  • 31. BusinessObjects Integration Kit for SAP - Crystal Reports 2008Change Field Headings 18. You need to edit the “(SAP Demo)” information out of the headings. Select the Preview tab. Right-click on the Product Group field and select Edit Text (you can also use double-click) from the shortcut menu. Remove the extra test so that the heading contains only the Product Group text. Repeat for the Product heading. Note: You can perform the same function in the Design tab.Add Summary Information The next step is to add summary information to your report. Adding summary information allows you to specify the author, title, and subject of the report, as well as any keywords or comments related to the report. When you add summary information, users can find information related to the report quickly. 19. On the File menu, click Summary Info. The Document Properties dialog box appears with the Summary tab active. 20. Enter information about your report in the text boxes provided. Be sure to complete the Author and Title fields.SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 31
  • 32. BusinessObjects Integration Kit for SAP - Crystal Reports 2008SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 32
  • 33. BusinessObjects Integration Kit for SAP - Crystal Reports 2008 Add a title As you can see, the report looks incomplete without a title. Although you can add a title using a text object, you can also tell the program to take the title information directly from the Title text box in the Document Properties dialog box. 21. Select the Design tab. Expand Special Fields in the Field Explorer. 22. Drag and drop Report Title to the upper left corner of the Page Header section of the report. 23. Drag and drop File Author to the lower left corner of the Page Footer section of the report. 24. Select the Preview tab to review your changes.SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 33
  • 34. BusinessObjects Integration Kit for SAP - Crystal Reports 2008Format an Object 25. You now need to format the title. To center the title, first expand the Title field to the same width as the data in your report. To do this, select the object by clicking it. Position the cursor on the right edge of the object until the cursor turns into a Resizing cursor. Drag the right edge of the field box until it is even with the right edge of the data in the Net Sales field object. 26. You have created a large field that extends from the left edge to the right edge of the report. With the report title object still selected, click Align Center on the Formatting toolbar. 27. Right-click the object and choose Format Field from the shortcut menu. 28. When the Format Editor appears, click the Font tab. Set the report title to a larger, bolder version of the active font by selecting Bold from the Style list and 16 (or a point size suitable to the font you are using) from the Size list. 29. Change the color of the text by selecting a new color from the Color palette. Notice that the Sample box shows an example of how the text will look. Click OK when finished. 30. Drag the bottom edge of the field box down to resize the report title object vertically and accommodate the increased size of the title. You should get the following result:SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 34
  • 35. BusinessObjects Integration Kit for SAP - Crystal Reports 2008 The report should look similar to this:SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 35
  • 36. BusinessObjects Integration Kit for SAP - Crystal Reports 2008Grouping & Charting 31. Select the menu Insert > Group and select Distribution Channel as the grouping field. 32. Select the Net Sales Keyfigure and right click on the field. 33. Select Insert > Summary and select a “Sum” for Group #1SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 36
  • 37. BusinessObjects Integration Kit for SAP - Crystal Reports 2008 34. Right Click the “Detail Section” in the Preview or Design view and select “Hide (Drill down ok)”. 35. Select the menu Insert > Chart 36. Place the chart to the Report Header (RH). 37. Double-click on one of the distribution channels in the chart to drill-down to the details.SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 37
  • 38. BusinessObjects Integration Kit for SAP - Crystal Reports 2008Save the Report 38. Select Save on the SAP toolbar (or use the menu SAP > Save) to save your work. The system displays the “Save a Crystal Report to BW” dialog. 39. Select the role and enter your report Description. 40. Select Save. The system displays the “Save to BW options” dialog. Select OK to save your report to the SAP NetWeaver BI system. 41. Click OK to save the report to SAP BI.SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 38
  • 39. BusinessObjects Integration Kit for SAP - Crystal Reports 2008Creating your First Report with Hierarchies from SAP BIFor this report I am using a SAP BI Query based on the cube 0D_DX_C01 (Demo Scenario DalSegnoCompany) with the following characteristics: o Customer with an activated hierarchyand the following keyfigures o Billed Quantity o Net SalesSAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 39
  • 40. BusinessObjects Integration Kit for SAP - Crystal Reports 2008 1. Select Start All Programs Crystal Reports 2008 Crystal Reports 2008 to start Crystal Reports. The SAP toolbar will appear on the left of the Start Page display. 2. In the SAP menu, select Settings. The Settings dialog appears. 3. Select Use MDX driver with support for Multiple structures and select OK.SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 40
  • 41. BusinessObjects Integration Kit for SAP - Crystal Reports 2008 4. Now you want to change the Initial Setup and show only the description of the characteristic and the key figures of the BEx query. 5. Select the menu File > Options > Database and set the option “‘Show Description’ Now the Field Explorer will show SAP metadata instead of the technical name for the fields.SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 41
  • 42. BusinessObjects Integration Kit for SAP - Crystal Reports 2008 6. In the SAP toolbar, select Create new report from a query. The SAP System dialog appears. 7. Select the system and click Next. Enter your logon information and select OK. The Select Query dialog appears. 8. Select Roles. Expand the folder and select the query. The activated hierarchy from the underlying SAP BW query will result in a parent-child relationship being represented in Crystal Reports. 9. Select the menu Insert > Group. 10. Select the Node ID field from the hierarchy.SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 42
  • 43. BusinessObjects Integration Kit for SAP - Crystal Reports 2008 11. Navigate to the Options tab. 12. Select the Customize Group Name Field option. 13. Select the description value for the hierarchy to the Medium Name from the characteristic CustomerSAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 43
  • 44. BusinessObjects Integration Kit for SAP - Crystal Reports 2008 14. Click OK. 15. Select the menu Report > Hierarchical Grouping options. 16. Select the Sort Data Hierarchically option. 17. Select the Parent Node ID field of the Customer Hierarchy.SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 44
  • 45. BusinessObjects Integration Kit for SAP - Crystal Reports 2008 18. Define the Group Indent. 19. Click OK. 20. Hide the detail section of your report. 21. Select the menu View > Print Preview. 22. Enter a date for the keydate variable (use the date of today)SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 45
  • 46. BusinessObjects Integration Kit for SAP - Crystal Reports 2008 23. Navigate to the Design tab. 24. Add a keyfigure to the details section of the report. 25. Right-click the added keyfigure. 26. Select the menu Insert > Summary. 27. Select Sum as the calculation option. 28. Select Group #1 for the summary location.The option “Summarize across hierarchy” allows creating a group summary by adding values from thelower level of a hierarchy up to a higher aggregated level. An example would be to summarize salary figuresfrom the lowest level of an organization hierarchy up to the top level of the hierarchy. In the case of an SAPSAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 46
  • 47. BusinessObjects Integration Kit for SAP - Crystal Reports 2008BW query as a data source the option “Summarize across hierarchy” is not necessary because the underlyingSAP BW query returns the aggregated values for all hierarchy nodes to Crystal Reports. 29. Move the summary to the Group Header #1. 30. Hide the Group Footer #1 in the report design. 31. Preview the report.SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 47
  • 48. BusinessObjects Integration Kit for SAP - Crystal Reports 2008Formulas for Hierarchical ReportingCrystal Reports designer offers some additional formulas and functions that allow the user to create a betterreport design and provide conditional formatting even in the context of a hierarchy.Formula Hierarchy LevelThe first formula for hierarchical reporting is the formula HierarchyLevel(). The formula HierarchyLevel()allows retrieving the level of the hierarchical grouping.The formula needs a GroupLevel as input.The following is an example for the formula syntax assuming Country Node ID is the grouping field in thereport: HierarchyLevel ( GroupingLevel ( {Country Node ID}) )Count Hierarchical ChildrenThe second formula is CountHierarchicalChildren() which allows counting the number of children of ahierarchy level. The formula needs a GroupLevel as input.The following is an example for the formula syntax assuming Country Node ID is the grouping field in thereport: CountHierarchicalChildren ( GroupingLevel ({Country Node ID}) )The count of children refers to the number of children in the hierarchy level.SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 48
  • 49. BusinessObjects Integration Kit for SAP - Crystal Reports 2008Conditional Formatting with Hierarchy LevelWith the formulas the report can be conditionally formatted so that the group headings follow an indentationand the keyfigures stay aligned.To change the formatting of the group headings1. Start Crystal Reports Designer (Start > Programs > Crystal Reports 2008 > Crystal Reports 2008).2. Open the report from the previous activity.3. Navigate to the Design tab.4. Select the menu Report > Hierarchical Grouping Options.5. Set the option Group Indent to 0.6. Click OK.7. Right-click the Group #1 Name field.8. Select the menu Size and Position.9. Click the icon for conditional formatting for the X-axis value.SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 49
  • 50. BusinessObjects Integration Kit for SAP - Crystal Reports 200810. Enter the following formula: (HierarchyLevel (GroupingLevel ({Hierarchy Node ID} ) ) ) *150 In our example the formula would look like the following: HierarchyLevel (GroupingLevel ({0D_DX_C01_BUSINESSOBJECTS_QRY_HIERARCHY.[0D_CUSTOMER TEMPORAL JOIN HIERARCHY]-NodeId})) * 15011. Click Save and close.12. Click OK.13. Select the menu View > Print Preview.SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 50
  • 51. BusinessObjects Integration Kit for SAP - Crystal Reports 2008SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 51
  • 52. BusinessObjects Integration Kit for SAP - Crystal Reports 2008Copyright© 2008 SAP AG. All rights reserved.No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG.The information contained herein may be changed without prior notice.Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation.IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iSeries, pSeries, xSeries,zSeries, System i, System i5, System p, System p5, System x, System z, System z9, z/OS, AFP, Intelligent Miner, WebSphere,Netfinity, Tivoli, Informix, i5/OS, POWER, POWER5, POWER5+, OpenPower and PowerPC are trademarks or registered trademarks ofIBM Corporation.Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe SystemsIncorporated in the United States and/or other countries.Oracle is a registered trademark of Oracle Corporation.UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks ofCitrix Systems, Inc.HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World Wide Web Consortium, MassachusettsInstitute of Technology.Java is a registered trademark of Sun Microsystems, Inc.JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented byNetscape.MaxDB is a trademark of MySQL AB, Sweden.SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as theirrespective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. Allother product and service names mentioned are the trademarks of their respective companies. Data contained in this document servesinformational purposes only. National product specifications may vary.These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAPGroup") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors oromissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in theexpress warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting anadditional warranty.These materials are provided “as is” without a warranty of any kind, either express or implied, including but not limited to, the impliedwarranties of merchantability, fitness for a particular purpose, or non-infringement.SAP shall not be liable for damages of any kind including without limitation direct, special, indirect, or consequential damages that mayresult from the use of these materials.SAP does not warrant the accuracy or completeness of the information, text, graphics, links or other items contained within thesematerials. SAP has no control over the information that you may access through the use of hot links contained in these materials anddoes not endorse your use of third party web pages nor provide any warranty whatsoever relating to third party web pages.Any software coding and/or code lines/strings (“Code”) included in this documentation are only examples and are not intended to beused in a productive system environment. The Code is only intended better explain and visualize the syntax and phrasing rules ofcertain coding. SAP does not warrant the correctness and completeness of the Code given herein, and SAP shall not be liable for errorsor damages caused by the usage of the Code, except if such damages were caused by SAP intentionally or grossly negligent.SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com© 2008 SAP AG 52