In my large report, one section calculates the "nexus" and displays it in the report. It works probably 50% of the time. Here is what it looks like when that section of the report doesn't populate.
here is the creation of the datatable:
$sql="SELECT item as Project, business_component, user_email, employee, w2_wages, dollars_per_pr as qualified_$, taxyear,number_of_employees, number_consultants, num_contracts, qualified_dollars, business_component
FROM survey_results_PR_temp srpr
WHERE campaign='$campaign' AND email='$email' AND taxyear='$taxyear'";
// GROUP BY role";
$this->src('substantiator')
->query($sql)
->pipe($this->dataStore("survey_project")) ;
and here is the creation of the grid in that section of the report
Table::create(array(
"dataStore"=>$this->dataStore("survey_project")->filter("taxyear","=",$_SESSION['last_TY']),
"showFooter"=>true,
"grouping"=>array(
"business_component"=>array(
"calculate"=>array(
"{sumAmount}"=>array("sum","qualified_$"),
),
"bottom"=>"<td><b>Total qualified wages for : {business_component}</b></td><td><b>{sumAmount}</b></td><br>",
),
),
"showFooter"=>"bottom",
"columns"=>array(
"business_component"=>array("label"=>"Business Component"),
"employee",
"user_email",
"w2_wages"=>array(
"label"=>"Gross wages"
),
"qualified_dollars"=>array(
"label"=>"QREs"
),
"qualified_$"=>array(
"label"=>"Wages",
"cssStyle"=>"text-align:left",
"prefix"=>"$",
"footer"=>"sum",
"footerText"=>"<b>Total Qualified Wages for Business Component:</b> @value")
),
"cssClass"=>array(
"table"=>"table table-bordered",
"tr"=>"row-css-class",
"th"=>"header-css-class",
"td"=>"cell-css-class",
"tf"=>"footer-cell-css-class",
)
)
);
I am also attaching the json of the file survey_results_PR_temp.
[{"taxyear":"201708", "user_email":"richardbernstein216@yahoo.com", "employee":"Richard3", "item":"accpac project", "campaign":"testco", "email":"richb201@gmail.com", "business_component":"Applefishy", "qualified":0, "number_of_employees":1, "num_projects":1, "qualified_dollars":35750, "role":"researcher", "dollars_per_PR":17875, "number_consultants":0, "num_contracts":0, "w2_wages":55000, "amount":0},
{"taxyear":"201708", "user_email":"richardbernstein216@yahoo.com", "employee":"Richard3", "item":"test project", "campaign":"testco", "email":"richb201@gmail.com", "business_component":"Pear Pie", "qualified":0, "number_of_employees":1, "num_projects":1, "qualified_dollars":35750, "role":"researcher", "dollars_per_PR":17875, "number_consultants":0, "num_contracts":0, "w2_wages":55000, "amount":0},
{"taxyear":"201708", "user_email":"xf1xr@imnart.com", "employee":"xf1", "item":"test project", "campaign":"testco", "email":"richb201@gmail.com", "business_component":"Pear Pie", "qualified":0, "number_of_employees":1, "num_projects":1, "qualified_dollars":78000, "role":"researcher", "dollars_per_PR":78000, "number_consultants":0, "num_contracts":0, "w2_wages":78000, "amount":0}]
This is the way it should look and appears sometimes immediately (rarely) and sometimes after I refresh the screen (sometimes). If it doesn't appear I can hit refresh 4 or 5 times and it eventually appears.