I don’t know why {count_ger} is not working for you in the onHeader event, but I just double checked and it does work in the onHeader event.
EDIT - If I remember correctly, the onHeader\onFooter events are triggered only if they are set to be visible in Layout>Header&Footer; so maybe you turned off the Header visibility?
Anyway, to hide elements when an SC macro is not available, you can always try JS or jQuery.
This is something I used on a grid onHeader event, to conditionally hide\show elements according to the number or rows:[INDENT]if < 10 records, hide refined search - using jQuery
if < 15 records, hide quick search - using an SC macro[/INDENT]The selectors to use in jQuery, i.e. $(’#ELEMENT_SELECTOR’), are easy discoverable using a browser inspector. Sometimes you need to work on more than one element to hide what looks like a single object on the web page.
if ({count_ger} <10)
{[INDENT]sc_btn_display("qsearch","off");
echo '<script>
$( document ).ready(function() {
$("#TB_Interativ_Search").hide();
$("#sc_grid_toobar_bot").hide();
$(".scGridLabelLink img").remove();
$(".scGridLabelLink").removeAttr("href");
});
</script>';[/INDENT]}
else if ({count_ger} <15)
{[INDENT]sc_btn_display("qsearch","off");[/INDENT]}