Skip to Content
Author's profile photo Former Member

Hiding a block based on user response and positioning other blocks relatively in Webi (BO XI 3.1)

                                                                                                                                                                   

Requirement:

Hide Block 1 based on user input and adjust the relative positioning of other blocks so that no empty space is there when the Block 1 is hidden. 

Hiding concept I have taken from http://www.dagira.com/2007/07/31/alerters-on-charts-part-ii/. I would really like to thank Dave for providing such wonderful articles. I have taken eFashion universe for demonstration purpose. 1st requirement is to hide block 1 based on user input and then we need to position the remaining blocks relatevely so that we don’t see any empty space when the block 1 is hidden.

Steps:

Here we will show Block 1 if user enters “Miami” for city object otherwise we will hide it.

1. Create a report with three blocks as shown:

1.JPG

2. Create a variable with the formula:

    =If UserResponse([City];”Enter City:”) = “Miami” Then 1 Else 0

2.JPG

3. Select the first block and apply the block filter as:

            Test = 1

3.JPG

4. Select the 1st block and go to the properties tab. Uncheck the option “Show when empty”.

4.JPG

5. Go to Edit query and drag City object in the filter panel and select equal to prompt.

6. Run the report with City = “Miami”. The report will be like:

6.JPG

7. And for any other city it will be like:

7.JPG

8. The first block is not showing now. One objective is met. Now the second thing is we need to utilize the space that is left above the 2nd block when 1st block   is hidden.

9.Now select the 2nd Block and click on relative position option as shown:

9.JPG

10. Enter following values:

10.JPG

11. Now select the 3rd block and repeat the process. Note that 2nd block is set relative to 1st block and 3rd block is set relative to 2nd.

12. Run the report with City = “Miami”. The report will look like:

11.JPG

13. Now run with some other value of City. The report will be like:

13.JPG

Thus we are able to hide Block 1 based on user input (City <> Miami in our case). Also the relative positioning of blocks is adjusted so that we do not have any empty space when the Block 1 is hidden.

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.