/
Publishing

Publishing

Purpose

Publishing is a module in the Perfion application that orchestrates the generation of reports and compiling them into a single result. Publishing is appropriate when the output contains many pages and the pages can be broken up into discrete chapters.

Publication provides control over of processing, the side an inner report starts and also the assembly of indexes.

Simple example

The following example highlights Publishing for a simple case.

In the image below, you can see a categorizing structure has been assembled for the purposes of Publishing.

In the structure shown above, the publishing system will run internal reporting on all the items that have a CatalogTemplate entry. Each time internal reporting is activated, it derives the report template to use from the value in the CatalogTemplate column. 

In the example above internal reporting will be activated six times with the following reports:

  1. Frontpage Report, run against the Frontpage item

  2. Index Report, run against the Index item

  3. Content – Sporty Report, run against the Sporty item

  4. Content – Normal Report, run against the Family Cars item

  5. Content – Normal Report, run against the Executive item

  6. Terms and Conditions Report, run against the Terms and Conditions item

The corresponding Reports folder would contain the following:

After each report has been generated, the results are aggregated into a publication. Then the publication is presented in the report viewer.

A Publication can be invoked by right clicking in the Publishing hierarchy and selecting Publishing->Publish… from the context menu.

Key Concept

The publication module can be thought of as a person whose role is to execute a series of reports in an order, then collate the results into a single output.

The task list for the publication module is provided in the form of a Publishing structure, and in the items of the publishing structure are the names of the reports to run.

Setup

The Publishing module is controlled by the data from two Features. The CatalogTemplate Feature is mandatory and is used to direct the publishing module to a report to execute. The CatalogPage Feature is optional. This Feature is used to supply the Publishing module directives on how to process the current report in terms of its page side and page number.

Setup of CatalogTemplate Feature

For publishing, it is mandatory that you have a feature named CatalogTemplate. The CatalogTemplate feature should be created as a String and made Selectable.

Enter the names of your reports into the Feature Data area for the CatalogTemplate. These names should match exactly to the names given in the Perfion Reports directory.

The following is an example of how the values might look:

Setup of CatalogPage Feature

The CatalogPage Feature is optional in Publishing. When used, it indicates to the Publishing module on how it handle pages of the associated CatalogTemplate report. For example a CatalogPage value could be used to indicate that the associated report should start with a specific page number or perhaps that it should start on a left side page.

Create a String Feature called CatalogPage. Depending on the usage you might make this Feature Selectable.

If you want to direct the Publication module to change to a specific page number during the creation process, then not Selectable might be best. This is so the user can type in a page number.

If however, the primary requirement is to control the Left / Right starting point of chapters, then Selectable would be best. If, both scenarios are required, then not Selectable would be appropriate.

The usage of CatalogTemplate and CatalogPage features are described below in Working with Catalog Templates and Forcing a page to left or right sides.

CatalogPage accepted values:

Value

Command

Description

{nn}

Set current page number

An integer page number. This will represent the page number to continue counting forward with from this point onwards.

Left

This chapter should start on the left side.

This will insure that the chapter is collated into the publication as a left page. It will insert a page into the publication if necessary.

Right

This chapter should start on the right side.

This will insure that the chapter is collated into the publication as a right page. It will insert a page into the publication if necessary.

Optional

This indicates an optional insert page.

A single page report can be indicated as optional. It will only be ‘optionally’ used if the following chapter is marked as Left or a Right and an insert page is required.

 

An optional page can also be specified at the end of a publication. Here it is used to fill out the end pages, if the publication is to be made with a Booklet layout.

Setup of a feature that represents the structure of the publication

A Feature should be created that represents the structure of the publication. A typical example of this Feature is as follows:

Organizing the structure to follow the organization of the physical output is considered a best practice.

Example publication structure

Launch the configuration editor for the publishing feature and add CatalogTemplate and CatalogPage to its configuration. Additionally, add the two features to the Family, Item view. This will make editing their values easier from the grid.

Setup Recap

Publishing is setup by creating two Features CatalogTemplate and CatalogPage. A publication feature needs to be created to represent the structure of the publication. The publication feature needs to be configured with the CatalogTemplate and the CatalogPage features.

CatalogTemplate values needs to be added that match the reports names that you have for the publication.

Link products into the chapters of the publication. Finally, select the reports you wish to run against each chapter by setting the CatalogTemplate values respectively. After these steps you are ready to run a publication. This is available from the context menu such:

Working with CatalogTemplates

When a report is specified on the publication via a CatalogTemplate value, then the reporting system will be invoked with the report that match the CatalogTemplate value.

The matching will be done on the report name. As of Perfion version 2020 R2 SR2 (4.8.6), reports are looked for both eternally and internally.

If there is no CatalogTemplate value for an item, then that item will not be included in the publication.

In the example above, Chapter 2 will not be included in a publication because there is no CatalogTemplate value for it.

Reports are executed at the point the CatalogTemplate value is defined

When CatalogTemplate is Inheritable, then its value is projected down on its children. You can see this in the above example for Chapter 1. The publishing module will only run the report at the top level. So in the example above, the Chapter 1 Template is only once against Chapter 1, and not a second time against detail.

A CatalogTemplate Report always starts on a new page

When a CatalogTemplate is specified, the report that is executed will always start on a new page. Content that should flow together should be contained in the same report.

Forcing page numbering

Page numbers in a publication can be changed at any point. This can be useful if there is a postproduction step to be made on the final pdf publication. An example could be where there are some inserts that are to be made.

To force an alteration to the page numbering, page number can be entered into the CatalogPage feature value.

In the example above, the page number will be reset to 10 at the start of Chapter 1.

The report designs need to take into account that they will be used within a publication. If a page number is required, then a text label should be used for it with its Tag property set to PageNumber. Page Info control, that would normally be used will not be updated by the CatalogPage directive.

Forcing page to left or right sides

The publishing system is able to insert an optional or a blank page in order to ensure a CatalogTemplate report starts on a Left or Right page if desired.

Left/Right control is achieved by used the CatalogPage feature value.

When a CatalogPage has a value of Left or Right, then the CatalogTemplate report will be inserted into the publication on the required side. For that to happen the Publication module may have to insert a page.

Left Right order

In publishing the front page is considered on the right.  Following this, the pages that follow swap from side to side. When a left/right directive is used it is calculated based upon the first page being on the right side. 

A common misunderstanding is that the page number set by CatalogPage is used to control the Left/Right directive. This is not the case, it is simply controlled by the first page is right, then next is left and so on.

Controlling the page used as an Insert

When the publication module has to insert a page, it will use a blank page unless an insert page has been indicated.

To indicate an insert page to the publication system, the Optional directive can be entered against a CatalogTemplate.

In the example above, Chapter 1 should be inserted on the Left side. If an insert page is required to do this, then the Blank Page Template will be used.

It’s important to remember that an optional item will ONLY be used when a non-optional item requires a page to be inserted.

Designing reports to work with Publication

Reports for publishing work exactly the same as regular reports.

That said, there are a few extra items that can be added to help the publishing system.

IndexMarker

The purpose of the IndexMarker is to supply the Indexes that are generated during publication with details of where rows are used in the report.

The index marker is a transparent Label that should be added to the report where the most detail is included. Typically, this is in the detail band. Sometimes the detail band is not used because of grouping, and in this case, it would be the most detailed grouping band.

The index marker should be added and given a transparent foreground so this it is not visible. It should have its Tag property set to IndexMarker. The text value for the label should be set to: [Structure.CatalogID]:[Structure.ItemID]

Setting its Height to 5 and to Can Grow to false will make it as small as possible on the design surface.

PageNumber

The purpose of the PageNumber is to output the correct publication page number.

The PageNumber label should be placed in the design at the location the page number should be shown. The label should be set with the Tag property of PageNumber. The Text property can be set to blank, as it will be filled in by the Publishing module.

By using the PageNumber label, the page numbering will follow the directives applied by the CatalogPage feature.

Working with Indexes

An index in the publication module is a special type of report. The data that is supplied to the index contains data for the publication as a whole. In this data there are also details of which pages the data was used on.

Before a report can be used as an Index, it must be marked as a PublicationIndex. This is achieved by adding an entry into the OutputsParameters section of Reports view.xml file.

Here is an example superquery that specifies the report as an Index: