{if $reportType == "new"} {if $rescount > 0 } {foreach $res as $datarow} {$datarow->doctorname} {$datarow->patientname} {$datarow->receiptdate} Cashing {/foreach} {else} No data found ........... {/if} {/if} {if $reportType == "cached"} {if $rescount > 0 } {foreach $res as $datarow} {$datarow->doctorname} {$datarow->patientname} {$datarow->receiptdate} {if $datarow->type == 0}Internal{else}External{/if} details {/foreach} {else} No data found ........... {/if} {/if}