If no data exists for a particular part of my report, I'd like to not show that section in the report. For example, there is no data for Nexus in the report shown on the attached page. In the view I'd like to be able to not have that section 1.4 appear at all and skip to the next section. How do I do that? (please don't answer that I just remove that section from the view!)
Here is the section of view that creates nexus:
<h2> 1.4 Nexus </h2>
<h4><font color="#006699">business components</font></h4>
<?php
Table::create(array(
"dataStore"=>$this->dataStore("survey_business_component")->filter("taxyear","=",$_SESSION['last_TY']),
"showFooter"=>true,
"columns"=>array(
"Business_component",
"amount"=>array(
"cssStyle"=>"text-align:right",
"prefix"=>"$",
"footer"=>"sum",
"footerText"=>"<b>Total dollars:</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"
)
));
?>
<h4><font color="#006699">projects</font></h4>
<?php
Table::create(array(
"dataStore"=>$this->dataStore("survey_project")->filter("taxyear","=",$_SESSION['last_TY']),
"showFooter"=>true,
"columns"=>array(
"Project",
"qualified_$"=>array(
"cssStyle"=>"text-align:right",
"prefix"=>"$",
"footer"=>"sum",
"footerText"=>"<b>Total dollars:</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",
)
)
);
Here is another example.
Sections that say "No data available in table", I'd like to just not appear in the report. How can i do this?
Here is the code in the view for this section:
<h2 id="First_Point_Header" style="font-weight: bold;color:black;font-size:40px">2. Methodology </h2>
<h2> 2.1 Division Background </h2>
<?php
Table::create(array(
"dataStore"=>$this->dataStore("campaigns2"),
"class"=>array(
"table"=>"table table-hover"
)
));
?>
<?php
Table::create(array(
"dataStore"=>$this->dataStore("campaigns22"),
"class"=>array(
"table"=>"table table-hover"
)
));
?>
<h2> <font color="#006699">2.15 IUS </h2>
<?php
if ($_SESSION['type']==2) //2 is software therefore include IUS
{
Table::create(array(
"dataStore"=>$this->dataStore("ius")->filter("IUS","=",1),
"columns"=>array(
"bus_comp",
"dual_use_text",
"innovative_text",
"sig_eco_text"),
"class"=>array(
"table"=>"table table-hover"
)
));
}
?>
<h2> 2.2 Products </h2>
<?php
Table::create(array(
"dataStore"=>$this->dataStore("campaigns22"),
"class"=>array(
"table"=>"table table-hover"
)
));
?>