I have two tables "Device" and "Location" I have to print counts in one report on the basis of device_state from device and device_location from locaiton. Below are two query which I am using using to calculate count of one type SELECT count(*) FROM device A INNER JOIN location B ON A.device_key=B.device_key WHERE A.device_deleted IS NULL AND A.device_state IN ('Test','Maintenance','Decommissioned','Production','Pre-Production') AND B.device_location LIKE '%UK%'; SELECT count(*) FROM device A INNER JOIN location B ON A.device_key=B.device_key WHERE A.device_deleted IS NULL AND A.device_state IN ('Test','Maintenance','Decommissioned') AND B.device_location LIKE '%ITALY%'; I have to execute 6 queries like above for different outputs I tried by including dataset but it is not working as $F get overrided by first value. Also I've tried by doing union , It is getting printed but though value all values get stored in a single variable so not able to perform +&- on different count results also as detail band executed six time so not able to put statis text feild Please help to print reports by suggesting alternative method or correct my method