PDF Reports in K2BTools

The WorkWith and SubWorkWith nodes allows the generaton of PDF reports showing the attributes and variables that are shown in the grid.

Managing page width limitation

Reports have a fixed width. It is possible that not all grid fields fit in the document. If they do not, K2BTools prints the first attributes of the grid only. The developer can change the following settings to get more field printed, select what fields are printed or even define a personalized report:

  • Change the paper type and/or paper orientation of the report.

This can be done in the standard actions of a workwith or subworkwith. The default value is taken from the K2BEntityServices settings

Paper type and paper orientation properties

Default value of paper type and paper orientation properties

  • Remove fields from the pdf document.

This can be done by setting the Use In Report property to false.

Show in report property

This is available in character based attributes and variables only.

Adding Code to the PDF Report

Developer can add code to reports, by adding an EventOrSub and setting the property show in report to true

The event will be included in the generated report

Changing header and footer

Image in the header can be changed using the design system configuration in the master page step.

Image Company Logo

In case more changes are needed in the header or footer, the default report layout can be changed. To do this, we recommend to follow this steps:

  1. Save ReportWWLayout with a different name (Ex:ReportWWLayoutCustom)
  2. Set the custom report layout as the default layout in the K2BEntityServices settings -> Standard Actions -> Report (Report Layout)
    Setting default report layout

  3. Edit the ReportWWLayoutCustom to match its needs. All printblocks and all code will be copied to the generated report.

Adding an image variable to the header printblock

In case of a multi tenant application, loading the image with the tenant logo

If there is the need to change the report layout of only one instance, this can be achieved by setting the report layout property in the standard actions node of the WorkWith and SubWorkWith node.

Watermarks can be added to the reports. For more information read How to add Watermarks in reports generated by K2BTools.

Changing reports design

Reports fonts, size and spacing can be configured in the K2BTools General Settings inside the report category.

K2BTools general settings report configuration