Skip to Content
Author's profile photo Jeroen van der A

Building an annual statement in design studio 1.0

In the first part of the blog i wrote about how i’ve built an annual statement in Design Studio 1.0.

If you haven’t read it yet here is the link :”

In this part I will describe the parts I have designed and how I think it would be easier to build them in the 1.1 version.

The navigation bar.


The buttons on the left and right are designed for the user to be able to flip through the pages of the annual statement as if it’s an actual book. A small detail was that I wanted the left button to disappear when the user is on page one and the right button when the user is on the last page.

Currently the code is like this :

if (PAGEBOOK_MAINSTORY.getSelectedPageIndex() == 1) {




if (PAGEBOOK_MAINSTORY.getSelectedPageIndex() == 2) {



if (PAGEBOOK_MAINSTORY.getSelectedPageIndex() == 3) {



if (PAGEBOOK_MAINSTORY.getSelectedPageIndex() == 4) {



if (PAGEBOOK_MAINSTORY.getSelectedPageIndex() == 5) {



if (PAGEBOOK_MAINSTORY.getSelectedPageIndex() == 6) {



As you see it has been worked out with a lot of if then statements. When calculation is possible in the 1.1 version as announced the code would look like this

EDIT *** As Vincent Low correctly states in the reply you can already do this like the code stated here below ***


if (PAGEBOOK_MAINSTORY.getSelectedPageIndex() == 1) {



For closing off all failing opportunities I should also put an IF THEN statement around the page change. If somewhere else in the app you can get to page one without hiding the left button you don’t want the statement goto page 0 to be executed.

The tables

I wanted a lot of tables with a particular layout and used a grid in combination with a lot of text objects.


  1. To fill all these I used coded names so I could keep track with all of them. I overdid it somewhat and the number of objects ran in the hundreds! That’s when I posted the idea to be able to find and object in the overview by searching for it based on name J

In the application on startup event there are hundreds of lines like these :


       “0CALYEAR”: “2011”,

       “ZDS_THEME”: “0010002”



       “0CALYEAR”: “2012”,

       “ZDS_THEME”: “0010003”



       “0CALYEAR”: “2011”,

       “ZDS_THEME”: “0010003”


As you see thanks to the name of the text object it is clear what it is. The descriptions I’ve put in manually. In 1.1 it will be possible to also get the dimension text with getdataasstring. Also the use of variables will make the code more readable. One thing you can shorten dramatically in code with variables is when you build a scorecard. Instead of the whole path of the image you can store it in a variable and your code would look like this :

IMG_SCORE.SETIMAGE(Greenscore) instead of
IMG_SCORE.SETIMAGE(“Root Folder/BI Demo/Design Studio/Probeersels/Business Balanced Scorecard (images)/ok-icon.png”)


In summary it’s a big task to build an annual statement in Design Studio at the moment. In the blogs about the announcements of the 1.1 version it’s foreseeable that things get easier to build.

It is great fun to think of scenario’s and putting design studio to the test. You are already able to build nice apps and at the same team learning a lot about the possibilities of the software.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Kudos, yet another great blog. While playing with the page mode and I came across a tip which might solve your long list of if statement.

      See code below;

      For next page button : PAGEBOOK_MAINSTORY.setSelectedPageIndex(PAGEBOOK_MAINSTORY.getSelectedPageIndex()+1)

      For previous page button :


      I am interested if this can help you too.



      Author's profile photo Jeroen van der A
      Jeroen van der A
      Blog Post Author

      Hi Vincent,

      thanks for the tip. I was so focused on the message that calculations would be in the next version i didn't even try it. But i've tested it and it works fine. Thanks!