How To Create an Embedded Report (Any Data Source) and pass values
This blog post will help you embed any report based on a standard OR custom data source and also pass values to your report selection criteria.
I could not find any documentation about this feature, SAP informed me of this feature after I raised an incident.
SAP if you are reading this and there is documentation available publicly please post in the comments and I will update.
You do not need cloud studio to perform this task. I actually tried this with cloud studio but could not achieve the requirement.
See my attempt here if you are interested:
Embedded sales reporting in the customer account screen. Our sales data came from a custom data source we generated and we need this available for our users to view individual customer sales data without having to open the ‘analysis’ work centre. This means we need to pass Account ID to our report from the Accounts Screen/BO.
You will need to have administrator access to the Business Analytics WorkCentre.
You will also need a browser such as IE so you can access silverlight. (Chrome no longer supports silverlight)
Step 1: Create your report
Open up C4C in silverlight mode so you can get access to the Business Analytics workcentre.
Create your report with the key figures you will need. In my example I created a report over a custom data source.
The report name doesn’t matter too much but I would suggest you note where this report will be used so other administrators don’t edit it by accident.
Step 2: Create View for Your Report
Make sure the report view name is something meaningful to the end user as the title will be displayed on the screen (However you can change the view name when you embed – step 6)
Set up the rows/columns exactly how you want the report to appear to the user.
Finally I had the requirement to pass ‘year’ to my embedded report. This isn’t available from the Accounts Screen so I had to save this as part of the default report view to ensure it will run correctly. SAP provide the ability to set a relative selection date, this means you can set current and previous year very easily (a very cool feature).
Save your view and selection as report default (important).
Step 3: Assign the report to the customer workcentre
If you miss this step, the end user will receive an authorisation error! If you are embedding your report in another screen you obviously use a different workcentre.
Step 4: Go back to HTML5 view (if this is the view that your users are utilising) and backup your page layouts
I suggest you do a quick backup of ALL layouts so you can easily reimport if something goes horribly wrong. Just click Export Layout and select all layouts.
Step 5: Open up the screen you wish to embed your report. Edit Master Layout.
In my case I created a new tab especially for these reports, but you can embed them anywhere you please. Take note – Any changes you make now will happen in REAL TIME. Be careful in production tenant.
One more note – I found it to be a little bit slow at times – Be patient! It will eventually process your clicks!
When you create a tab it will create a section for you automatically as below:
Click on the circle with the + inside to add new items… Hang on a minute… where is the option to add embedded report? This was a hard to find feature!
Click the little UP ARROW on the right. This will navigate to the parent.
Hang on… there is still no option for embedded reports!
Click the little UP ARROW once more. BOOM! The option becomes available.
Step 6: Select the report (search by view name as defined in step 2) and configure report parameters.
In my case I needed to pass account ID so I mapped the screen field Account (*) to the UUID report parameter.
If you followed my instructions carefully at the end of step 2, tick ‘Report Default’ for Year and it will be set to current YYYY and last YYYY.
One more important note! Untick the ‘show collapsed view’. Otherwise you have to expand the report manually each time you open the screen.
Step 7: Click ‘End Layout Changes’ from the adapt menu and reopen your screen to test
The fun part – has it worked? If you have configured your views and parameters correctly the report will open as below!
Little Gotcha – If you default your report view to ‘Chart and Table’. The report will open as a table instead. Make sure you have chart as default.