Organizing Filters

Some reports may have many filters. As the number of filters increases, it may be more practical if you lay them out in multiple columns. For example, building on our previous example, we can add the columnQuantity attribute to the Report element:

<Report columnQuantity="2">

images/download/attachments/144836763/twoColFilters-version-1-modificationdate-1655932263000-api-v2.jpg

But what if you have so many filters, even a multi-column layout is not enough? In that case it may make sense for you to mark some of them as dynamic. A dynamic filter is one that must be added using the "Add Filter" option in the UI. Dynamic filters tend to keep the UI less cluttered when there are too many filtering options available. As an example, let's convert our Supplier filter to dynamic by adding the dynamic="true" attribute.

<CustomFilterField dynamic="true">
<FieldRef category="PDF" levelType="ZBKS.Book">
<ModelLinkTargetLevelType>Organization</ModelLinkTargetLevelType>
<FieldName>Supplier</FieldName>
</FieldRef>
<Type>MODEL_LINK</Type>
<ModelLinkMapping surrogateIdSqlName="SUPPLIER_ID" displayFieldSqlName="SUPPLIER_NAME"/>
</CustomFilterField>

Once you have done this, you will find that filter has disappeared from the default list of filters shown, and can be added dynamically by the end-user using the Add Filter button.

images/download/attachments/144836763/dynamicFilter-version-1-modificationdate-1655932279000-api-v2.jpg