Dear Team, I am able to pass the values from main report through url and print the values in sub report but the only thing is I am unable to pass those values to the query. Which is present in the sub report.
And the above code which you have provided is not working for my condition.
SELECT *
FROM tblemployeedetails em INNER JOIN tblcustomerenquiries ce ON ce.custTreatedDoctor=em.employeeId
LEFT JOIN tblbranch tb ON tb.brnchId=ce.custBranchId
LEFT JOIN tblsourceofinformation ts ON ts.srcId=ce.custSourceId
WHERE tb.brnchName IN (:brnchName) AND ce.custCreatedDate>=:start AND ce.custCreatedDate<=:end AND ts.srcName IN (:srcName) AND em.employeeFirstName=:employeeFirstName
AND ce.custEnquiryId IS NOT null ORDER BY ce.custName
->params(array(
":start"=>$this->params["start"],
":end"=>$this->params["end"],
":brnchName"=>$this->params["brnchName"],
':srcName'=>$this->params['srcName'],
":employeeFirstName"=>$this->params["employeeFirstName"]
))
->pipe($this->dataStore("result1"));
<div class="col-sm-4 form-group">
<label>Select Branch<?php //echo $this->params["statename"]; ?>:</label><br>
<?php
BSelect::create(array(
"name"=>"brnchName",
"multiple"=>true,
"dataStore"=>$this->dataStore("result2"),
"dataBind"=>"brnchName",
"options"=>array(
'numberDisplayed' => 5,
'includeSelectAllOption' => true,
),
"clientEvents"=>array(
"change"=>"function(){
subReport.update('statereportselect',{
statename:$('#statename').val(),
brnchName:<?php echo json_encode($this->params['brnchName']); ?>,
});
}",
),
"attributes"=>array(
"class"=>"form-control",
)
));
?>
</div>
<div class="col-md-4 form-group">
<div class="col-sm-5">
<label>Select Year:</label>
<?php
Select::create(array(
"name"=>"yearname",
"dataStore"=>$this->dataStore("result3"),
"defaultOption"=>array("--"=>null),
"dataBind"=>"yearname",
"clientEvents"=>array(
"change"=>"function(){
subReport.update('statereportselect',{
statename:$('#statename').val(),
brnchName:<?php echo json_encode($this->params['brnchName']); ?> ,
yearname:$('#yearname').val(),
});
subReport.update('statereportOrders');
}",
),
"attributes"=>array(
"class"=>"form-control",
)
));
?>