Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Birt Report - looping through datasource in javascript(Birt Report - looping through datasource in javascript)
Birt Report - looping through datasource in javascript [message #1792495] Wed, 18 July 2018 17:48
Justin Boss is currently offline Justin BossFriend
Messages: 1
Registered: July 2018
Junior Member
I'm trying to use Google charts in my Birt report. I have added a text and set it to display as html. Now I need to loop through the data set or data cube and to create an array like in var data. I'm just not sure how to do that or if that is the right way to do it. I have tried to look for a foreach looping through a data set or cube but have not found any. I have bound the data set to the text. I have also included the report and the csv data file.

Thanks for your help.

google.charts.load('current', {packages: ['corechart', 'bar']});
google.charts.setOnLoadCallback(drawBasic);

function drawBasic() {

      var data = google.visualization.arrayToDataTable([
        ['City', '2010 Population',],
        ['New York City, NY', 8175000],
        ['Los Angeles, CA', 3792000],
        ['Chicago, IL', 2695000],
        ['Houston, TX', 2099000],
        ['Philadelphia, PA', 1526000]
      ]);

      var options = {
        title: 'Population of Largest U.S. Cities',
        chartArea: {width: '50%'},
        hAxis: {
          title: 'Total Population',
          minValue: 0
        },
        vAxis: {
          title: 'City'
        }
      };

      var chart = new google.visualization.BarChart(document.getElementById('chart_div'));

      chart.draw(data, options);
    }
Previous Topic:Upgrading BIRT runtime from 4.5 to BIRT runtime 4.8
Next Topic:Birt Excel - width error
Goto Forum:
  


Current Time: Mon Sep 24 05:22:21 GMT 2018

Powered by FUDForum. Page generated in 0.01477 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top