STRING

To configure a string field for display, set the field type to STRING.

Following is an example of display a STRING field.

Include the string field in the select clause. To illustrate, we take the title from the Book Model.

select title TITLE from ZBKS_Book

The retrieval should be defined as follows:

<CustomRetrievalField>
<FieldRef levelType="ZBKS.Book" category="PDF">
<FieldName>Title</FieldName>
</FieldRef>
<Hidden>true</Hidden>
<Type>STRING</Type>
<SimpleMapping sqlName="TITLE"/>
</CustomRetrievalField>

Note

By default, a string field which is the first natural key part of a model will be converted into a MODEL_LINK if the SysId for that model is also available in the report. If you want to disable this behavior, change your levelType in your CustomRetreivalField "Undefined".

Following is an example to filter a STRING field.

Include the string field in the where part of the SQL. To illustrate, we take the title from the Book Model.

${filterIfNotNull:TITLE,title like $TITLE$}

The filter should be defined as follows:

<CustomFilterField>
<FieldRef category="PDF" levelType="ZBKS.Book">
<FieldName>Title</FieldName>
</FieldRef>
<Type>STRING</Type>
<Optional>true</Optional>
<SimpleMapping sqlName="TITLE"/>
</CustomFilterField>

Following are the key points to note:

  • LevelType in the FieldRef is pointed to Book, which is where the title field is defined.

  • Field Category is set to PDF(PreDefined Field)

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

  • SimpleMapping is defined in the CustomRetrievalField

  • SimpleMapping is used to map the field with the SQL parameter