Skip to Content

Applies to

:

SAP BusinessObjects Web Intelligence and SAP BusinessObjects Business Intelligence 4.0 SP4. For more information, visit the SAP BusinessObjects Web Intelligence homepage.

:

Author: Mallikarjuna Chary Narayandas:

:

Company: Gyansys Inc.

:

Created on: September, 21 2013

:

Author Bio

:

The author has worked on several SAP BusinessObjects projects and has experience on using all the SAPBusinessObjects Business Intelligence platform tools. Author has experience on working with SAPBusinessObjects mobile including designing and accessing BusinessObjects content (Web Intelligence Reports, Crystal Reports, Dashboards, Analysis and Information Spaces) through IPad / IPhone / Android.

:

Hello everyone, This is one of my first attempts of writing  in web intelligence, as this is one space which I have been avoiding to write taking it easy with one question (What’s so complex or interesting in webi to share) popping up on top of my mind all the time. But, finally time has come for me to contribute to this space as well, as I am convinced with the idea of why not share something that’s frequently used though it might be a simple or rare requirement for some of the readers.

:

Requirements & Logics

:

Requirement:

:

We had some reports running for a fiscal quarter selection and bring up previous and next quarter data so that Actuals and Planned can be compared in the report across Previous, Current and Next Quarters. Another end user requirement was to report getting data for current fiscal quarter when nothing is selected in the prompt and at the same time showing current fiscal quarter value in the user selection display area, just below the report title.

:

Logic:

:

Above requirement has led to deriving current fiscal quarter using below logic for current fiscal quarter and the variable to show in selection area.

:

vCurrentFiscalQuarter –  Grouping of month values to quarter depends on which month the fiscal quarter Q1 starts for the respective organization

:

=If(MonthNumberOfYear(CurrentDate()) InList(11;12;1);”1″;If(MonthNumberOfYear(CurrentDate()) InList(2;3;4);”2″;If(MonthNumberOfYear(CurrentDate()) InList(5;6;7);”3″;If(MonthNumberOfYear(CurrentDate()) InList(8;9;10);”4″;”0″))))

:

Fiscal quarter in User Selection Area:

:

=If(IsPromptAnswered(“Select Fiscal Quarter”);UserResponse(“Select Fiscal Quarter “);([vCurrentFiscalQuarter])

:

Note:

:

Above works fine with single value selection prompts, but to deal with multiple values prompts you can use above logic for variables, but place the main user selection variable in horizontal table so that it spans horizontally returning all selected values side by side in selection area. Otherwise you can always go for showing up default “All” value when nothing is selected as below.

:

=If(IsPromptAnswered(“Select Countries”);UserResponse(“Select Countries”);”All”)

:

Requirement:

:

We had some requirement from the same users to show some of the user selection values with a line separator after each value. In the below example User selected values string “PQ Actual – PQ Commit;PQ Actual – PQ Flash;CQ Commit – PQ Actual;PQ Actual – PQ-1 Actuals;FY Commit – FY AOP;StratPlan” showing up as in the screen shot below.

WTT1.jpg

:

Logic:

:

Since we need either Line Feed (/n) or carriage return (/r) to add a line seperator between values, we have used the simple logic of replacing the semi colons present in the user response string with Char(10) and Char(13) which are character conversion of decimal equivalent values of /n and /r.

:

Using Line feed /n

:

=Replace(UserResponse(“Select Countries:”);”;”;Char(10))

:

Using carriage return /r

:

=Replace(UserResponse(“Select Countries:”);”;”;Char(13))

:

I guess most of the webi developers would know below, but I am listing these keeping in my mind that these may help those beginners who would want to refer some of the below.

:

Requirement – Footer:

:

Standard content represented across footer to display Last refreshed date, User running the report and Page n of N as below.

:

Logic:

:

=”Last Refresh Date: ” + LastExecutionDate()

=”User ID:” + ” ” + CurrentUser()

=”Page No “+Page()+” of “+NumberOfPages()

:

Requirement – Header:

:

Automate your title to reflect document name using below

:

Title=DocumentName()

:

Title name is most common requirement, but there could be some of the super users who might ask to show up universe name from which the report is sourced and what is the number of rows retrieved by my report query, just to ensure they see zero or blank when they don’t see data on reports. Below are the formulae that would help in such cases.

:

Source Universe= UniverseName(DataProvider([Query1].[Object1]))

:

Number of Rows Retrieved =NumberOfRows([Query 1])

:

I would come up with slightly complex and more interesting requirements and corresponding logics in part 2 of this series. Until then Have a happy reading experience 😉

:

References and Related Content

:

SAP BusinessObjects Web Intelligence:

:

Space: SAP BusinessObjects Web Intelligence | SCN:

:

For more information, visit  SAP BusinessObjects Business Intelligence Platform

:

Disclaimer and Liability Notice:

:

This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document and anyone using these methods does so at his/her own risk.SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

  1. Prasad Damoder

    Hi Mallik,

    Thanks for sharing your experience/expertise on the User requirements and logic to implement it. This would be very handy when such a requirement comes.

    Regards,

    Prasad

    (0) 

Leave a Reply