Class: ReportBuilder

ReportBuilder

Provides an API for programmatic construction of report definitions. Use jsreports.createReport() to get a new ReportBuilder, as shown in the example below.

Constructor

new ReportBuilder()

Do not call directly. Use jsreports.createReport() to get a new ReportBuilder.
Example
// Create a new report definition
var reportDef = jsreports.createReport()
 .setDataSource("time")
 .groupBy("Client_ID")
   .header()
     .text("Group header text")
   .footer()
     .text("Group footer")
 .detail()
   .text("Detail with [data]")
 .input('Client', 'text')
 .filterBy('Client_name', 'contains', '[?Client]')
 .done();

// Render the report
jsreports.render({
  report_def: reportDef,
  datasets: myDataSets,  // defined elsewhere
  target: $('#myDiv')
});