Background
The qbo.Report module provides a mechanism for users to schedule the running of reports, including scheduled execution and delivery by email.
Google Visualization
The qbo.Report.Google plugin allows server-side creation of Google Visualization DataTables. To consume such a data table, invoke:
// Generic Pattern
Report/GVis.ashx/{ClassName}/{Method}?{Parameters}
// Render a pivot table of DecisionSteps by template and created date
Report/GVis.ashx/DecisionStep/Pivot?Dimension=CreatedDate,DecisionStepTemplateID&CreatedDateStart=1/1/2005&Column=DecisionStepTemplate&Decision.DecisionTemplateID=110&IncludeTotal=false
// Render smart worklist members by Assigned Person and Smart Worklist
Report/GVis.ashx/SmartWorklistMember/Pivot?Dimension=AssignedPersonID,SmartWorklistID&Column=SmartWorklist&Active=1&Output=Json&Row=AssignedPerson&IncludeTotal=false&Facts=CompletedCount
With the results of the GVis.ashx output, one can construct a chart using the Google Visualization API:
// Load the visualization package
google.load("visualization", "1", {packages:["corechart"]});
// Assume 'canvas' is the id of a div tag where we want our chart displayed
var bc = new google.visualization.BarChart(document.id('canvas'));
// Assume data is a variable containing the JSON response from GVis.ashx
var dataTable = new google.visualization.DataTable(data);
// Render the chart
bc.draw(dataTable, { width: 600, height: 400, legend: { position: 'top', maxLines: 3 }, bar: { groupWidth: '75%' }, isStacked: true, });
Scheduling a Report from the front end
To schedule a report, perform the following steps:
Navigate to the Reports Dashboard.
On the left hand side, click on the Report that you would like to schedule. In this case, we select 'Demo'.
On the right hand side, click the + button.
Provide a label, frequency, and email address for the schedule.
If you want a daily report, Select 'Weekly', and select each Day.
Click Submit.