RESULT, CROSSTAB, and NESTED report types allow you additional control over whether you wish to display group members that have no data.


By default, RESULT reports display only group members that have data. To display all members, regardless of the presence of data, use the WITH_BLANKS modifier:


{|RESULT|}
{|LOOP|RESULT.CLIENT_10_LEVEL_4(RESULT_FILTER=WITH_BLANKS)}
...
{/|LOOP|}
{/|RESULT|}


CROSSTAB reports include all group members by default, regardless if they have data. To remove any group members that have no data whatsoever, use the NO_BLANKS modifier:


{|CROSSTAB|}

  #displays all months of the year, even if they have no data

  {|LOOP|CROSSTAB.MONTH_OF_YEAR(SORT=ORDER_NUM)}

    #displays only days of the week that have data in at least one month

    {|LOOP|MONTH_YEAR.DAY_OF_WEEK(SORT=ORDER_NUM,CROSSTAB_FILTER=NO_BLANKS)}

      ...

    {/|LOOP|}

  {/|LOOP|}

{/|CROSSTAB|}



NESTED reports include only group members with data by default. You may wish to combine nesting with crosstabbing, in which case you can use the WITH_BLANKS modifier to show all group members regardless of if they have data.


{|NESTED|}

<table>

  {|LOOP|NESTED.REGIONS(SORT=NAME)}

    {LOOP.ISFIRST?:|VANISH|}

      <thead>

        <tr>

          <th>Name</th>

          {|LOOP|REGIONS.DISTRICTS(SORT=NAME)}

            {|SHOWIF|LOOP.ISFIRST?}

              #displays a header column for every day of the week, 

              #even if it doesn't have data for a particular district

              {|LOOP|DISTRICTS.DAY_OF_WEEK(SORT=ORDER_NUM,NESTED_FILTER=WITH_BLANKS)}

                <th>{DAY_OF_WEEK.NAME}</th>

              {/|LOOP|}

            {/|SHOWIF|}

          {/|LOOP|}

        </tr>

      </thead>

      ...

  {/|LOOP|}

</table>

{/|NESTED|}



Finally, you may find that trending reports pose their own particular type of challenge because you want to include time intervals that have no data, but only if they fall within a time span that has data. For this, you would use the WITH_BLANKS_IN_RANGE modifier.


{|CROSSTAB|}

  <table>    

    {|LOOP|CROSSTAB.CLIENT_10_LEVEL_3(SORT=NAME)}

      {|SHOWIF|LOOP.ISFIRST}

        <thead>

          <tr class="header-row">

            <th>Name</th>

            #display only month-years within the range of existing data            {|LOOP|CLIENT_10_LEVEL_3.MONTH_YEAR(SORT=ORDER_NUM|DESC,CROSSTAB_FILTER=WITH_BLANKS_IN_RANGE)}

              <th>{MONTH_YEAR.NAME}</th>

            {/|LOOP|}

          </tr>

        </thead>        

      {/|SHOWIF|}

      ...

    {/|LOOP|}

  </table>

{/|CROSSTAB|}


Note that you can further modify the data included in the RANGE using RANGE_FILTER:


#ignore any code-specified Sorts, Info, Limits, Filters

#this will still include any filters specified by the report controls or URL filters

{|LOOP|CLIENT_10_LEVEL_3.MONTH_YEAR(SORT=ORDER_NUM|DESC,CROSSTAB_FILTER=WITH_BLANKS_IN_RANGE,RANGE_FILTER=IGNORE_SILF)}


#Override any code-specified Filters with the Filter provided

#this will still include any filters specified by the report controls or URL filters

{|LOOP|CLIENT_10_LEVEL_3.MONTH_YEAR(SORT=ORDER_NUM|DESC,CROSSTAB_FILTER=WITH_BLANKS_IN_RANGE,RANGE_FILTER=ID|ne|32014)}


#Override any code-specified Filters with the Filterset provided

#this will still include any filters specified by the report controls or URL filters

{|LOOP|CLIENT_10_LEVEL_3.MONTH_YEAR(SORT=ORDER_NUM|DESC,CROSSTAB_FILTER=WITH_BLANKS_IN_RANGE,RANGE_FILTERSET=ID|ne|32014;ID|ne|42014)}


#For the purposes of calculating the range of group members with data,

#ignore any filters except the date filters

{|LOOP|CLIENT_10_LEVEL_3.MONTH_YEAR(SORT=ORDER_NUM|DESC,CROSSTAB_FILTER=WITH_BLANKS_IN_RANGE,KEEP_ONLY_RANGE_FILTERS=TRENDING_TIMESTAMP)}


#For the purposes of calculating the range of group members with data,

#ignore the date filters

{|LOOP|CLIENT_10_LEVEL_3.MONTH_YEAR(SORT=ORDER_NUM|DESC,CROSSTAB_FILTER=WITH_BLANKS_IN_RANGE,IGNORE_RANGE_FILTERS=TRENDING_TIMESTAMP)}