4 Replies Latest reply on Jul 16, 2009 2:41 AM by ravisparking

    How to connect Xcelsius data to Flex component

    ajdove
      My question pertains to Business Objects software Xcelsius 2008 which we are using to create a dashboarding application. Xcelsius uses a copy of an Excel spreadsheet and creates a locally bound version then severs the connection with the original spreadsheet. Therefore, after loading in my Flex component into Xcelsius 2008, how do I create properties for the component so Xcelsius will allow me to bind the Excel data grid to elements of my Flex component? 
      ScreenHunter_0059.jpg
      This example demonstrates both my custom Flex component (orange bars) and the inherent column chart in Xcelsius (blue bars). The "Column Chart 1" panel on the far right displays the properties which can be bound to the blue bar chart.  These, among other properties in this panel are not available to my custom Flex component so I have been limited to using hard-coded data inside the Flex source to compile the  charts. This is not a workable solution for us as we need to be able to use the  inherent data in Xcelsius spreadsheets to bind to the custom components we bring  into Xcelsius.

       

      So...how can I bind the spreadsheet data from Xcelsius to  the custom Flex component charts/graphs to create a visualization or population  of the graph? Xcelsius graphs are able to use the properties panel to create  "titles" and create the data connection, however, my new custom component from  Flex does not have this properties panel available. This panel is empty. Is  there a way to either create properties to use or enable Xcelsius to bind  inherent properties to my custom components?

       

      Please help...I'm a  struggling Xcelsius newbie
      Alex Dove
        • 1. Re: How to connect Xcelsius data to Flex component
          ajdove Level 1

          I found in the book "Xcelsis 2008: Dashboard Best Practices", written by Loren Abdulezer who is also connected with Xcelsius Journal, that is states to modify a line of code from a previous example in the book.  The instructions don't directly fix the problem because they only address the example used in the book and not a generic, custom application. Here is the abridged code from the previous sample BasicHorizontalSlider.as:

           

          package com.anl.book.basicslider

          {

          import mx.controls.HSlider;

          import mx.controls.Label;

           

          [CxInspectableList ("title", "showTitle")]

          [Inspectable(defaultValue="showTitle", type="String")]

          [Inspectable(defaultValue="Title", type="String")]

          .

          .

          .

           

          There is also a get/set function for each "title" and "showTitle"

           

          public function get title():String{...}

          public function set title(value:String):void):String{...}

          public function get showTitle():String{...}

          public function set showTitle(value:String):void):String{...}

          .

          .

          .

           

          The steps for the fix are as follows:

          1. Change the line of code in the BasicHorizontalSlider.as file from [CxInspectableList("title","showTitle")] to [CxInspectableList("title","showTitle","value")]

          2. Save file

          3. Re-compile the SWF

          4. Rebuld the .xlx file for Xcelsius

          5. Load the new component

           

          I suppose my question would be how does this solution get modified to my example or for any other example in the future? The previous sample referenced by BasicHorizontalSlider.as is a app which displays a sliding bar displaying the x-value in a tooltip as you drag the control left and right. So, then is the element CxInspectableList the variable which needs to be changed per usage?

           

          Any suggestions?

          Thanks in advance.

          Alex Dove

          • 2. Re: How to connect Xcelsius data to Flex component
            ajdove Level 1

            I am making progress!  I have successfully created a horizontal slider component in Flex and integrated it with Xcelsius spreadsheet to display data. Hooray!

             

            ScreenHunter_0063.jpg

             

            This is a simple binding of linear information. The slider takes the values bound to it from the range in the spreadsheet and assigns it to "Value" When I slide the slider handle the numbers move, however, since the "defaultValue" had been coded and the starting number in the spreadsheet range was 6 the slider handle started at the number 6. This is good, but not something I can work with in its current state.

             

            My attempts to restructure the code to display graphing data in a column chart has been unsuccessful. Upon import of the Flex component onto the canvas of Xcelsius no data binding occurs. Rats!

             

            Any suggestions?

            • 3. Re: How to connect Xcelsius data to Flex component
              ajdove Level 1

              I am making progress! I have successfully created a  horizontal slider component in Flex and integrated it with Xcelsius spreadsheet  to display data. This is a simple binding of linear information. The slider  takes the values bound to it from the range in the spreadsheet and assigns it to  "Value" When I slide the slider handle the numbers move, however, since the  "defaultValue" had been coded and the starting number in the spreadsheet range  was 6 the slider handle started at the number 6. This is good, but not something  I can work with in its current state.

               

              Support from SAP has stated the following in a separate discussion thread on their boards:

               

              When the Xcelsius 2008 Default Property Sheet loads for your add-on this is what  is does:


              * Looks for the

              [CxInspectableList(+propertyName+,+propertyName2+,+...+)]
              
              meta data in your add-on class


              * So you must have a property  in your add-on class for each name in CxInspectableList.

              * The property  sheet will have an entry for each name in CxInspectableList -- the data type is  picked up from the Inspectable meta-data for each property.

              * You can  define a property in Flex as a public var (and Flex generates a getter and  setter for you) or you create your own getter and setter as we do for the  majority of our properties.

              * The reason you see us you our own getter  and setter (for example with the title) is so we can detect when the title has  been changed (so the setter has been called) and do something to update our  add-on display.


              So for each property that you want to see in the Xcelsius  2008 Default Property Sheet you need to:


              * Create the property in your  add-on, add the http://Inspectable(...+) meta data for your  property.

              * Add the property name to CxInspectableList

              *  Re-compile your SWF.

              * Re-package your XLX

              * Re-import the XLX  into Xcelsius

              Then if you have done things correctly you should see your  new property in the add-on property sheet.

               

              My attempts to restructure the code  to display graphing data in a column chart has been unsuccessful. Upon import of  the Flex component onto the canvas of Xcelsius no data binding occurs. Rats!
              My code for the attempted fix, as instructed by SAP's support, is as follows:
                   public var scores:String;
                   public var names:String;
                   public var scoreValues:Number;
                  
                   [Inspectable(defaultValue="true")]
                   [CxInspectable("scores","names","scoreValues")]
              Somewhere I am doing something wrong, however, I cant determine where my errors are located...hmmmmmm.

              Any suggestions?          

               

              • 4. Re: How to connect Xcelsius data to Flex component
                ravisparking

                Hi,

                 

                Can u pls provide detail steps how to connect Xcelsius data to flax component.

                 

                Regards

                Ravi