Provider Snippets

/*This provides a dropdown box of provider names.*/

/*
<PARAMETERS>

<PROVIDER
  STATEMENT="select provider_desc
                  , provider_no
             from provider
             union
             select cast('<All Providers>' as VarChar(40)) provider_desc
                  , cast(-1 as integer) provider_no
             from rdb$database"
  DEFAULT="<All Providers>"
>
</PROVIDER>

</PARAMETERS>
*/

...
where (provider_no = :Provider
  or Cast(-1 as integer) = :Provider)
...
/*This provides a dropdown box of currently enabled provider names.*/

/*
<PARAMETERS>

<PROVIDER
  STATEMENT="select provider_desc
                  , provider_no
             from SERVICE_PROVIDER_SELECT(null, 'TODAY', null, null)
             union
             select cast('<All Providers>' as Char(60)) provider_desc
                  , cast(-1 as integer) provider_no
             from rdb$database"
  DEFAULT="<All Providers>"
>
</PROVIDER>

</PARAMETERS>
*/

...
where (provider_no = :Provider
  or Cast(-1 as integer) = :Provider)
...