Python scripting PDF reports - Settings

Settings in the language files

Previous  Chapter  Next

Preliminary note


For translating the report items there are translation files for each provided language (English, French, Chinese, Japanese, German). By default the language files are located in the installation path …\Lib\site-packages\cenpylib\languages.

 

PDF_LanguageDefltLocation

In case of customization, the complete languages folder can be copied to a desired path, which is given with the create command. Otherwise the report takes the default files.

 

PDF_LanguageCustLocation

 

Customer related settings and translation can be done there. Only the desired language file needs to be edited.

Following listed settings are supported to adjust the report. If the item doesn't exist, the defaults form the script will be taken



Report name


defaultreportname


This item is the default PDF file name, where two hashes ## (if given) will be replaced by the current program name.

 

PDF_LanguageFileSetReportName



Font


setfontname


This item sets the desired font type.

Please note: for Chinese and Japanese language only one set of characters exists. This setting is obsolete in this case.

 

PDF_LanguageFileSetFontType


setfontsize


This item sets the desired font size.

The font size will be taken into account for Chinese and Japanese as well.

 

PDF_LanguageFileSetFontSize


Command name


commandname


This item sets the desired command name in the Run auxiliary commands if the method GetCommandName is prepared accordingly (see below).

 

PDF_LanguageFileCommandName

Example:

def GetCommandName():

  nls = NLSUtility()

  nls.defineNLS(project="report")

  cmdname = nls.getNLS("commandname", "Report")

  return cmdname

 

NLS is set to the report language files. It tries to get the item commandname. When the item does´t exist, apply the string "Report" as result.



Operation


operationheader


Add a table row header before output an operation.

 

0 = none, but divider

1 = only OpName [default]

2 = Group&OpName  

3 = absolute none

 

PDF_LanguageFileOperationHeader


operationsummary


This item sets a summary row after each operation. Default is no summary (=0).

 

PDF_LanguageFileOperationSummary


Logo image


nologouse


This item sets if header and footer images shall be used.

The default is True, which means that no pictures will be used.

PDF_LanguageFileNoLogoUse


Table


headerrowcolorrgb


This item sets the desired background colour of the table header row.

The item values are the RGB portions (0..255) separated by a point; i.e. xxx.yyy.zzz.

The default value is grey, RGB 176.176.176

 

PDF_LanguageFileHeaderRowColour


Column width


For each column its width can be specified by setting the value in the *.lng file.

 

Naming convention is: [columnName]colwidth

 

PDF_LanguageFileSetColumnWidth



Previous
Previous page
Chapter
Chapter page
Next
Next page