Knowledge Report Type Types

This page discusses:

KnowledgeReportFormatEnum

Type that indicates the format of the document to generate. The value can be: XML, XLS, CSV. The default value is XML.

Inheritance Path

ObjectType
 Literal
  Enumere
   KnowledgeReportFormatEnum

Enumerated Values

ValueNLS ValueComment
XMLXML-
XLSXLS-
CSVCSV-

KnowledgeReportGeneration

Type used to launch and value the inputs of the Knowledge report.

General Information

PropertyComments
NLS nameGenerate Knowledge Report
new (EKL)KnowledgeReportGeneration

Inheritance Path

ObjectType
 Feature
  KnowledgeReportGeneration

Attributes

Name used in EKLNLS NameTypeComment
DocGeneratedFullPathOutput Document Generated Full PathString Complete path of the generated document. Especially useful when OverwriteDocGenerated is set to False.
DocGeneratedNameDocument Generated NameString Name of the document to generate.
DocGeneratedPathDocument Generated PathString Path of the document to generate on the file system. The default value is the system temporary directory.
ErrorCodeError codeInteger

Error code. Is an addition of all error codes detected at generation:

  • 1: Warning added when an existing file has been replaced on file system.
  • 2: Error added when the mandatory attribute Roots is an empty list.
  • 4: Error added when the mandatory ReportName attribute is empty.
  • 8: Error added when the mandatory DocGeneratedName attribute is empty.
  • 16: Error added when the generation failed.
  • 32: Error added when saves on file system failed.
  • 64: Error added when saves on database failed.
ErrorStringError stringString Description of all detected errors.
OverwriteDocGeneratedOverwrite DocGeneratedBoolean

Indicates if the system can replace an existing file by the document generated on the file system. The default value is False.

If the value is set to False and if an existing file is found on the file system, the system adds the "_" character along with an integer at the end of the name of the generated document. This name is used to save the generated document on the file system and in the database.

ReportNameReport NameString Name of the report to generate. This report must have previously been saved in database.
RootsList of RootsList List of objects from which the report will be generated.
SaveOptionSelect Document Generated Save OptionEnumere

Indicates the save option used at generation. The value can be one of the following: Disk, Database. The default value is Database.

When the Disk value is set, the system saves the generated report only on the file system.

When the Database value is set, the system saves the generated report on the file system and in database.

SheetIndexSheet index to replaceInteger

Indicates the excel sheet to replace. The default value is 1.

This attribute is taken into account at generation if:

  • the Format attribute has been set to XLS.
  • the OverwriteDocGenerated attribute has been set to True.

If the index set does not correspond to an existing index in the existing file on the file system, the system creates a sheet of the index and creates empty sheets the between last existing sheet and the created sheet.

Methods

The following method is associated with this type:

Example

let listRoots(List)
listRoots.Append(ProductRoot)

// Build date
let now(Date)
let nowString(String)
set now = BuildDate()
set nowString = DateFormat("%y%m%d_%H%M%S", now)

// Object creation
let generReport(KnowledgeReportGeneration)
generReport = new("KnowledgeReportGeneration", "name", NULL)

// Set mandatory inputs on the created object
generReport.ReportName = "ReportNameSavedInDatabase"
generReport.Roots = listRoots
generReport.DocGeneratedName = "BaseName"

// to obtain a unique name: Add the date to the name of doc generated file
// generReport.DocGeneratedName = "BaseName" + "_" + nowString



// optional inputs
generReport.OverwriteDocGenerated = True

// to create an Excel sheet, attribute Format must be modified.
let formatEnum(KnowledgeReportFormatEnum)
formatEnum = "XLS"
generReport.Format = formatEnum

// Specify a sheet index to modify
generReport.SheetIndex = 4

generReport.DocGeneratedPath = "E:\\temp\\"

// Launch Generation
generReport.Generate()

// Popup to analyze outputs
Message("FullPath generated: #|ErrorCode: #|ErrorString: #|Format chosen: #", generReport.DocGeneratedFullPath,
generReport.ErrorCode, generReport.ErrorString, formatEnum)

KnowledgeReportSaveOptionEnum

Type that indicates the save option used at generation. The value can be: Disk and Database. The default value is Database.

When the Disk value is set, the system saves the generated report only on the file system. When the value "Database" is set, the system saves the generated report on file system and into database.

Inheritance Path

ObjectType
 Literal
  Enumere
   KnowledgeReportSaveOptionEnum

Enumerated Values

ValueNLS ValueComment
DiskDisk-
DatabaseDatabase-