Accessing Crystal Reports from Design Studio using Report Linking
What if there is a client requirement that calls for the powerful visualization of Design Studio and the highly formatted data presentation of Crystal Reports ? Well, the ideal solution for that would be to use Report linking, which is similar to the Report-to-Report Interface functionality in BW. It is straightforward and very easy to use.
I had a Design Studio dashboard that showcased a lot of KPIs across several views using attractive visualization and a Crystal Report that provided the detailed record of the KPIs across different dimensions. I then added a report launch button to the dashboard, which when clicked, would launch the report, with the parameters passed.
Let me walk you through the steps required to achieve this.
Steps for Report Linking
To demonstrate the functionality, I created an Accounts Receivable dashboard in SAP Design studio 1.3 SP1. The report was designed using SAP Crystal Reports for Enterprise 4.x.
To keep things simple, I have used a single value prompt here. But we can add multiple variables with multi-select option as well, to be passed to the report from the dashboard. Here I’ve passed the value “USA” from the dashboard, in the document link of the report.
The document link of the report can be extracted from the BOBJ launch pad. Right click on the document and go to document properties.
The document link, with the parameters concatenated to the link, needs to be passed in the APPLICATION.OpenNewWindow() function. Following is the code written in the On Click event of my launch button, to open the report in a new window.
My variable’s technical name is prefixed with an lsS which signifies that I’m passing a single value variable to the report. Listed below is the prefix to be attached to the technical name of the variable depending on the type of variable used.
Type of variable | Prefix | Comments |
Single value | lsS |
|
Multiple value | lsM |
|
Range |
lsR | Prompt values have to be specified in [](Square brackets) |
Selection variable | lsI ( combined with any of the above) | Can be a single value / multi-value or range that is chosen at runtime |
Below is a snapshot of the report launched from Design Studio, filtered on the value of the variable for country, “USA”.
In case the report does not fetch data, check the variable screen to ensure that the prompt value was passed as required.
Points to Note
- If the launch button has to trigger a report created using Crystal Reports 2011, then you will have to prefix the variable prefix (here ‘lsS’), with an ‘X’.
- You can use any type of variable you want, in the data source, except for the selection option variable. It does not work well with Crystal Reports.
- The maximum number of variables that may be passed also depends on the max no of characters that your browser supports. For instance, IE has a max character limit of 2048. One way to cut down on the length is to avoid passing blank values to non-mandatory variables.
- This feature is only partially mobile device compatible, since the behavior of the APPLICATION.OpenNewWindow() function is unpredictable in iOS 7.
- This technique is comparable to the RRI functionality in BW. RRI is on the Design studio roadmap, yet to be supported.