ADDRESS

An internatonalized address field on a model. In the database, this is split into address_country, address_comp1, address_comp2, address_comps. For example, if the address field on a model is named PublisherAddress, the database columns will consist of publisher_address_country, publisher_address_comps1, publisher_address_comp2, publisher_address_comps.

To configure an address field as one of the filter field or retrieval field, CustomFilterField or CustomRetrievalField should be used respectively. These fields also require that AddressMapping be defined to map the fields to the SQL parameters.

Following is an example of displaying the address field in the report.

In the select clause the required address related database columns must be included.

select PUBLISHER_ADDRESS_COUNTRY, PUBLISHER_ADDRESS_COMP1, PUBLISHER_ADDRESS_COMP2, PUBLISHER_ADDRESS_COMPS from ZBKS_Book

The retrieval should be defined as follows:

<CustomRetrievalField>
<FieldRef levelType="ZBKS.Author" category="PDF">
<FieldName>HomeAddress</FieldName>
</FieldRef>
<Type>ADDRESS</Type>
<AddressMapping addressCountry="PUBLISHER_ADDRESS_COUNTRY" addressSearchComp1="PUBLISHER_ADDRESS_COMP1" addressSearchComp2="PUBLISHER_ADDRESS_COMP2" addressComps="PUBLISHER_ADDRESS_COMPS"/>
</CustomRetrievalField>


Following are the key points to note:


  • LevelType in the FieldRef is pointed to Author, which is where the PublisherAddress field is defined.

  • Field Category is set to PDF(PreDefined Field)

  • Field name is the same as the one defined in the Author model.

  • Type is set as ADDRESS (Note the capital letters)

  • AddressMapping is defined in the CustomRetrievalField

  • AddressMapping has references to the SQL parameters defined in the select clause of the SQLDef