Crystal Reports - Queries


Advertisements

SAP BEx and Universe data source connections allow you to create and design query in Crystal Reports.

Create Queries

To create a query in Universe you can choose both OLAP and Relational data sources.

First step in a query design is to define objects that you want to add in your query. You can also refine your query by applying sorts and query filters. Query panel is divided into multiple panes −

Edit Query

Universe Pane

It contains a tree structure of all the objects in Universe. You can see all the objects in Universe by using Expand All option.

You cannot add new objects or edit existing objects in query panel.

Result Objects Pane

In this area, you add objects that you want in your query.

Query Filter Pane

This is used to filter the value of objects in the report. You can use predefined filters or can create custom filters by adding objects.

SAP BEx queries can contain one or more hierarchies and predefine objects to run the report.

SAP HANA queries include data from SAP HANA Modeling views: Analytic, Calculation Views. To connect to HANA database and to use Schemas → tables inside the database, you can use an existing Relational or OLAP connection. A Relational connection can be created in IDT tool.

An OLAP connection can be created in CMC as well as in Information Design tool. HANA multi-dimensional views can be connected to Crystal Reports using an OLAP connection.

Olap Connection

Click on Next → It will show you list of all Modeling views inside HANA repository → Select a Modeling View → Finish

It will open objects of view in a query panel, which can be used to add them to the report.

Query Panel

Editing a Query

Once the Crystal Report is created using a query, to make changes to objects you have to go to edit data source option. When you click on the option, it will open an Edit Query panel where you can add/delete objects, apply filters, etc.

You can also edit an existing query by going to Data → Edit Data Sources as shown in the following image.

Editing a Query

Once you are done with the changes, click on Finish and all changes will be applied to data in Crystal Report.

Advertisements