Skip to Content
author's profile photo Former Member
Former Member

Adding dynamic data in home page of infoview

Hi All,

I want to add a chart (pic,bar) on the infoview home page (where we find Document list and Personalize). The chart should be dynamic.

For ex: Pie chart should display the active no users v/s total no of users.

2. If this is not possible at least i have to display these numbers in the form of text i.e 

no of active users: 100

total no of users: 500

I could get the query for getting the no of active users.

What page should i modify to get point 1 or 2. Any help is appreciated.

Thanks

Shreyas

pie.PNG (9.5 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 13, 2013 at 11:13 PM

    Hello Shreyas,

    Create your own MyInfoview using BIWorkspace and set that as a home page tab using preferences....

    Thnak You,

    Amol

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 01, 2013 at 06:16 AM

    Here it is.

    Piece of jsp code for getting the count on active sessions and users in the systems.I wrote the below code in home,jsp itself.

    // Logon and obtain an Enterprise Session

    boEnterpriseSession = CrystalEnterprise.getSessionMgr().logon( boUser, boPassword, boCmsName, boAuthType);

    boInfoStore = (IInfoStore) boEnterpriseSession.getService("", "InfoStore");

    boInfoObjects= (IInfoObjects)boInfoStore.query("SELECT top 6000 SI_ID FROM CI_SYSTEMOBJECTS where SI_KIND='USER'");

    boInfoObjects2= (IInfoObjects)boInfoStore.query("SELECT SI_ID FROM CI_SYSTEMOBJECTS WHERE SI_KIND = 'Connection' AND SI_FAILOVER_AVAILABLE_UNTIL = NULL AND SI_AUTHEN_METHOD != 'server-token' ORDER BY SI_NAME");


    totaluser=boInfoObjects.size();

    sessioncount=boInfoObjects2.size();

    This was to get the data for the pie.

    To create a full fledge pie chart refer.

    https://developers.google.com/chart/interactive/docs/gallery/piechart

    Here is snippet of the code for pie chart. Pass the values in totaluser and sessioncount to the pie chart.

    var data = new google.visualization.DataTable();

    data.addRows([

    ['No of users', <%=totaluser%>],

    ['Users logged in', <%=sessioncount%>]]);

    // Set chart options

    var options =

    { 'title':'Current user ratio',

    'titleTextStyle':{color: 'black', fontName:'Calibri', fontSize:17},

    'width':350,

    'height':175,

    'colors':['5c85f4','FF8000'],

    'is3D':'true',

    'fontSize':10,

    'legend':{position: 'right', alignment:'center', textStyle: {color: 'black', fontSize: 10}},

    'chartArea':{left:20,top:30,width:250,height:150},

    'tooltip.text':'both',

    'legend.alignment':'center',

    'backgroundColor':'F7F8E0'

    };

    Write a div tag to display the pie chart.

    This is it. Whenever a user logs into Infoview, home,jsp runs and the latest values are passed to the pie chart, thereby displaying the dynamic data.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 27, 2013 at 10:36 AM

    Thanks Amol.

    Im using 3.1.

    I could find a way to do it using google API, Here it is.https://developers.google.com/chart/interactive/docs/gallery/piechart.


    I included the code in home.jsp page.

    To make the pi chart dynamic,i can write a PL/SQL code and forward the results to a text file. The text file will have a number which represent the count of users.A piece of Javascript code to extract the contents of the text and store it in a variable. I can use this variable in the code used to generate pie chart.

    PL/SQl code has to be executed on a frequent basis to get the latet data.

    Thanks
    Shreyas

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 28, 2013 at 05:33 PM

    I was able to write the SQL in a jsp page and directing the output into a text file. Values to the pie chart would be the values from the textfiles. Thereby making it dynamic😊

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 22, 2014 at 07:53 AM

    Hi Shreyas

    We're looking for an almost identical code that you have mentioned. Clearly you were successful in your attempt. Since we're completely unfamiliar with JSP, could you please share your code for obtaining the current number of users and sessions? Do you also know how we could obtain the number of connections to the server at a given time and the total reports run in a day?

    Also, a small clarification - is your code being run in the BO environment or is it a stand-alone Java application?

    Thanks a lot

    Kriti

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.