Moving Custom Crystal Reports to Embedded Analytics
4 min read
Embedded analytics offers a new approach for reporting. Instead of requiring the reports to be pre-generated (as with Crystal), embedded analytics provides access to Stories in an ad-hoc fashion. Embedded analytics Stories are generated when the user opens the Story. This approach eliminates the need to generate reports for users that will never view the reports and can save considerable amount of processing time.
There aren't any utilities or processes to convert Crystal Reports to embedded analytics stories. Stories must be created from scratch to replicate the Crystal Report. The process described in this article utilizes the existing custom reporting tables used by the Crystal Report to create a Custom Data Model in embedded analytics.
Table of Contents
Crystal Report Architecture
The recommended approach for developing Crystal Reports is to have the processing logic contained within Stored Procedures in the database and ultimately populating a report table with data. The report table is then queried from within the Crystal Report with a simple, single table query. This approach provides the best performance for generating Crystal Reports as it eliminates queries with joins and instead satisfies the data requirements for the report with a simple, single table query. This reporting table will continue to be used to provide data in the embedded analytics Custom Data Model. Please refer to the Microlearning video "Creating a Custom Data Model in embedded analytics for SAP Commissions" towards the bottom of this article, for more details.
Embedded analytics Custom Data Model
Custom data models within embedded analytics are created based on HANA Views. Utilizing HANA Views it is possible to add a Structured Privilege phrase to limit the data that is returned by the View. This provides data security for the View, ensuring that data access is controlled for each user.
When developing custom data models based on existing Crystal reporting tables, the process for creating the HANA Views is straight forward. The query defining the view can be a simple SELECT statement, pulling data from the existing report table. This view can then be used as the source object when creating the Custom Data Model.
Creating the embedded analytics story
Embedded Analytics provides many more capabilities for displaying data than an be found in Crystal. Based on these capabilities you may choose to represent the data in a more graphical, user-friendly format than was found in the Crystal Report. It is up to the developer to choose the appropriate widgets to display the data in the new embedded analytics story. Its is possible to use Table controls to very closely match the format of the existing Crystal report, but it may desirable to change the widgets used to provide a better user experience.
Triggering the Reporting Stored Procedures
When running Crystal Reports, the act of scheduling and running the reporting pipeline will cause the execution of the reporting stored procedures. In our case, we want to trigger the stored procedures to create the reporting tables, but we do not want to generate the Crystal Reports. This will be accomplished by triggering the reporting stored procedures directly, not relying on the report execution to trigger the stored procedures. The optimal time to execute the reporting stored procedures is after the calculation pipelines have completed. The reporting procedures can be triggered after the completion of the calculation pipeline or by utilizing a trigger file at the desired time.
Links to Product Documentation on Help.SAP.com
Additional information on embedded analytics can be in the SAP Commissions Product Documentation.
Migrating Crystal Reports to embedded analytics stories provides a way to reduce the processing times required for generating reports and provide a better user experience. While there isn't a way to convert Crystal Reports to embedded analytics, it is possible to utilize the Crystal reporting tables to create the custom data model that the embedded analytics stories will be based on.