You may configure one or more buttons on an edit screen to merge data with an Adobe PDF document, using any field data from the current issue (and related issues) that are displayed on the edit screen. The Adobe PDF document is created outside ExtraView using tools from Adobe.
It is possible to further customize the contents of PDF document using custom code techniques - see the User Custom Guide.
The setup involves three basic steps:
The resulting Adobe PDF document is added into the ExtraView issue as an attachment or into the contents of a document type field.
The template is created with the administration utility named Adobe PDF Report Mapping, found on the Operational Tasks administration menu. Within the utility, press the Add button to begin the process.
Creating the PDF template
Simply provide the title to the template, and browse to and select your PDF document. Then click on the Create Template & Upload File button. You are then taken to the following screen:
Mapping fields with the PDF template
There are several key sections to the properties. You will see some examples as comments within the properties.
ev_field|<ExtraView_field> = pdf_field|<PDF_field>
For example, if you want to map the ExtraView named SHORT_DESCR to a PDF field named TITLE you would use:
ev_field|SHORT_DESCR = pdf_field|TITLE
If you want to map a single ExtraView field to multiple fields within a PDF document, use a the label parameter as shown here:
The <label_n> is any string that makes the left-hand side of the expression unique. For example, if you have the SHORT_DESCR field in ExtraView and you want to use that as a heading on a PDF with two pages with a heading field of hdr1 on page 1 and hdr2 on page 2, you would use:
In addition to ExtraView's fields, you may also map the following:
For example, we might want to map the value of Not Fixed as a value in the ExtraView field named STATUS to a checkbox field in a PDF document, where the checkbox field is named Not finished_checkbox:
Note the use of the \ character to escape the space character.
It is possible to map the one ExtraView field value to multiple fields within the PDF form. The syntax is as follows:
Use either of the above two forms, depending on whether you are mapping to a single or to multiple fields in the PDF document. For example, to apply a filter named myProjectFilter which refers to a field named ADDRESS within a related issue you might have this entry for the mapping:
For example, we might want to map the value of Not Fixed as a value in the ExtraView field named STATUS of a related issue to a checkbox field in a PDF document, where the checkbox field is named Not finished_checkbox. We want to use the relationship defined by the filter named myProjectFilter:
It is possible to map the one ExtraView filtered field value to multiple fields within the PDF form. The syntax is as follows:
An example of using the default date format is:
The pdf_page|<page_number> parameters indicate where in the PDF document that the document or image will be inserted.
As well as mapping these fields from the current issue, you can map them from repeating records and related issues, using the filtered field mechanism. The syntax is:
An example might be to map the same image in an ExtraView image field named LOGO_IMAGE at the beginning and end of a document:
This example shows how two filters can be used:
You may use the special variables $$SYSDATE$$, $$SYSDAY$$, $$USER$$, and $$ID$$ to match the current date, current day, current user, and the ID of the current issue respectively.
Similar to the LINK business rule directive, you use the RG_NAME and RG_TYPE attributes to define filters for related issues. The syntax is:
The RG_NAME is the name of an existing relationship group. The RG_TYPE may be one of CHILDREN, GRANDCHILDREN, GRANDPARENTS, PARENTS, RELATED, MEMBERS, LINKED, or SIBLINGS.
If you do not specify RG_NAME or RG_TYPE for a filter, the default relationship group is used, with an RG_TYPE of LINKED.
The filter can be used to define how to display the results, when many records are returned by the filter. Typically, you will want to display the results horizontally or vertically. The syntax for the filter is:
where delim is the string used to delimit the records. The default delimiter is a comma. If you want to display the results vertically you will use the delimiter \n to introduce a newline character between each result.
The typical entries you will define for related issues that are to be mapped to a PDF document are:
An example of a filter definition for use within related issue mappings might be:
When handling repeating rows, you can use the ROW_NUM attribute to match a specific row. The syntax is:
The button field is created within the data dictionary as a User Defined Field with the following properties:
Property | Purpose |
Fixed Name | The name you use to create the field must begin with GENPDF_ and end with _BTN. For example, a valid name is GENPDF_SALESREPORT_BTN |
Title | You normally will not want to see a title with the button field you are generateing, therefore use a space character for the title |
Display Type | This must be Custom |
Default Value | This is the name of the template you created in the first step. It is important to use the exact name you created |
Help Text | This is text that will be placed on the button and will be visible to the user. For example, you might put Generate PDF as the text |
Help URL | This entry should either be the word ATTACHMENT to store the generated PDF document as an attachment, or the data dictionary name of a document field to store the generated PDF document in a document field. |
Simply place the field you created in the previous step on the edit screen layout where you want to see the button. You may apply the usual layout cell attributes such as FIELD VISIBLE IF to the field on the layout.