ResultReport

The base class for report types.

Example

app = pf.GetApplication()
app:NewProject()
app:OpenFile(FEKO_HOME..[[/shared/Resources/Automation/startup.pfs]])

    -- Only generate the report if Microsoft Word is installed
    
if ( app.MSWordInstalled ) then

        -- Add a Word 2007 report template to the POSTFEKO session
    
    reportTemplate = app.Reports:Add(
        FEKO_HOME..[[/shared/Resources/Automation/StartupModel.dotx]], 
        pf.Enums.ReportDocumentTypeEnum.MSWord)    

        -- Extract the tags from the template document and get a list of the open windows in the 
        -- current session

    tags = reportTemplate.Tags
    windows = reportTemplate.Windows
    
        -- Build a map of tags to window titles
    
    tagwindownames = {}
    tagwindownames["Graph1:"] = "startup1"
    tagwindownames[tags[2]] = windows[3]
    reportTemplate.TagSettings:Modify(tagwindownames)

        -- Set the image export size to Custom and specify a resolution

    reportTemplate.ImageSize.SizeType = pf.Enums.ReportImageSizeEnum.Custom
    reportTemplate.ImageSize.Width = 1600
    reportTemplate.ImageSize.Height = 1200

        -- Generate the report
        
    reportTemplate:Generate([[temp_StartupModelReport.docx]])
end

Inheritance

The following objects are derived (specialisations) from the ResultReport object:

Property List

ImageFormat
The image format to use when exporting images for the template report. (Read/Write string)
ImageSize
Report image export size options. (Read only ReportImageSizeSetting)

Property Details

ImageFormat
The image format to use when exporting images for the template report.
Type
string
Access
Read/Write
ImageSize
Report image export size options.
Type
ReportImageSizeSetting
Access
Read only