Slide Show of Monthly Region wise Data

First Create Two Global variable .

V_pbcounting :  Integer (0)

AutoChart_Player : String (Play)

  Global Script variable.png

Now add PAGEBOOK in your Application.

Add 5 Pages in It . // I Have Taken Example for 5 Months Only June 2013 , July 2013 … October 2013

Set Transition Effect “Slid In”.

  Slide In Transition Effect Of Pagebook.png

Now Add 5 Charts & 5 Text Box in your PAGEBOOK .

1 Text & 1 Chart in Each Page of PAGEBOOK .

CSS Style for all TEXT :

-ms-transform: rotate(-90deg);

-moz-transform: rotate(-90deg);

border-style:solid;

text-align:center;

Now add 2 more TEXTs (TEXT_5 : ”Counting” And TEXT_6 ) Outside PAGEBOOK (In Application )

& 2 Buttons 

  1. PLAY_BTN_1
  2. PAUSE_BTN_1 .

Now In “On StartUp” Write the Code below .

  1. APPLICATION.doBackgroundProcessing();

Now In “On Background Processing” Write the Code below .

if (AutoChart_Player == “Play”) {

       v_pbcounting = v_pbcounting + 1;

       TEXT_6.setText(Convert.floatToString(v_pbcounting + 0.00));

       if (v_pbcounting == 20) {

              PAGEBOOK_1.setSelectedPageIndex(1);

              APPLICATION.doBackgroundProcessing();

       }

       else {

              if (v_pbcounting == 40) {

                     PAGEBOOK_1.setSelectedPageIndex(2);

                     APPLICATION.doBackgroundProcessing();

              }

              else {

                     if (v_pbcounting == 60) {

                           PAGEBOOK_1.setSelectedPageIndex(3);

                           APPLICATION.doBackgroundProcessing();

                     }

                     else {

                           if (v_pbcounting == 80) {

                                  PAGEBOOK_1.setSelectedPageIndex(4);

                                  APPLICATION.doBackgroundProcessing();

                           }

                           else {

                                  if (v_pbcounting == 100) {

                                         PAGEBOOK_1.setSelectedPageIndex(0);

                                         APPLICATION.doBackgroundProcessing();

                                         v_pbcounting = 0;

                                  }

                                  else {

                                         APPLICATION.doBackgroundProcessing();

                                  }

                           }

                     }

              }

       }

}

else {

       “”;

}

Now Provide “Play” & “Pause” Button in Application .

Now In “PLAY_BTN_1” OnClick  Write the Code below .

AutoChart_Player = “Play”;

PLAY_BTN_2.setVisible(false);

PAUSE_BTN_1.setVisible(true);

  1. APPLICATION.doBackgroundProcessing();

Now In “PAUSE_BTN_1” OnClick  Write the Code below .

AutoChart_Player = “Pause”;

PLAY_BTN_2.setVisible(true);

PAUSE_BTN_1.setVisible(false);

Application will Look Like :


Application.png

You Can Use SetFilter Also to change the Data in Different Chart .


To report this post you need to login first.

3 Comments

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

  1. Dirk Mayrock

    Hi Nikhil,

    using the .doBackgroundProcessing as a “Player” is a really cool idea… Thanks for sharing!

    Liked, Bookmarked, and Rated 🙂

    Dirk

    (0) 
  2. Mike Howles

    Pretty cool idea to use doBackgroundProcessing as an event loop/playhead.  I’d caution that each execution of BI Scripting occurs on the server side (as small as it may be, it’s still there) so having this looping issue repeated calls on the server side for sake of incrementing a counter may have effects if you have a large number of these dashboard sessions open indefinitely.

    Still pretty cool to see!

    (0) 

Leave a Reply