Applicable Versions: 3.05.0035 and above


It is possible to set the default values programatically using several sets of properties.


A generic property DefaultExportPath can be used to set the Default Path to be used by the exports, additionally there are several export Objects available to set the individual export type's default properties.


To set the DefaultExportPath:


Set PAReports1.ApplicationObject = PAApplication
PAReports1.Initialise
PAReports1.OpenReport "c:\reports\Customers.rpa"
PAReports1.defaultExportPath = "c:\exports" 
PAReports1.ExportReport


This tables below summarises the available objects that can be used to set the defaults for the different object types, the defaults need to be set before the ExportReport method is run:


Objects


Property
Description
ExcelExportDefinition
Sets or returns a collection of default properties that can be set for the Excel Exports.
HTMLExportDefinition
Sets of returns a collection of default properties that can be set for the HTML Exports
PDFExportDefinition
Sets or returns a collection of default properties that can set for the PDF Export
RTFExportDefinition
Sets or returns a collection of default properties that can be set for the RTF export.  
TextExportDefinitionSets or returns a collection of default properties that can be set for the Text export.
TIFFExportDefinitionSets or returns a collection of default properties that can be set for the Tiff export.


Excel Export Definition

 

Property
Type
Description
AutoRowHeight
Boolean
When set to true, Excel will correct for the size of the line by resizing the line to the largest object on the line
BorderSpace
Integer
Defines in twips the height added to a cell to prevent vertical size borders overlapping characters.
DoubleBoundaries
Boolean
Use the double boundaries property when text strings force the export to place columns on both the left and right sides of a field
FileName
String
Specifies the name of the file to which the report will export
GenPageBreak
Boolean
Determines if the Export method will generate page breaks automatically in the exported file.
MinColumnWidth
Long
Specifies in twips how small columns can be in the Excel document. Larger values reduce number of columns in a sheet.
MinRowHeight
Long
Specifies in twips how small rows can be in the exported file. Larger values force the export to place more controls on a single line.
Multisheet
Boolean
Determines if the report will be generated as a single Excel sheet, or as a multiple sheet workbook.
ShowMarginSpace
Boolean
Specifies whether the space between the report elements and the margin will display. Default is False.
TrimEmptySpace
Boolean
Determines if the exported report outputs runs of vertical empty spaces, or if they are eliminated.
Version
Integer
Sets the Excel version of the exported file.


To use the Export Definitons:

 

 

Set PAReports1.ApplicationObject = PAApplication

PAReports1.Initialise

  

PAReports1.OpenReport "c:\reports\Customers.rpa"

 

PAReports1.ExcelExportDefinition.AutoRowHeight = True

PAReports1.ExcelExportDefinition.BorderSpace = 65

PAReports1.ExcelExportDefinition.DoubleBoundaries = True

PAReports1.ExcelExportDefinition.GenPageBreaks = False

PAReports1.ExcelExportDefinition.FileName = "c:\Exports\Customers.xls"

PAReports1.ExcelExportDefinition.MinColumnWidth = 1045

PAReports1.ExcelExportDefinition.MinRowHeight = 195

PAReports1.ExcelExportDefinition.MultiSheet = True

PAReports1.ExcelExportDefinition.ShowMarginSpace = False

PAReports1.ExcelExportDefinition.TrimEmptySpace = False

PAReports1.ExcelExportDefinition.Version = 7

 

PAReports1.ExportReport


 


HTML Export Definition

 

Property
Type
Description
AuxOutputPath
String
Destination path for images
CharacterSet
String
Sets the destination character set.
CreateCSSFile
Boolean
Determines whether or not a .css file will be created when the report is exported.
CreateFramesetPage
Boolean
Determines if framesets will be created
FileNamePrefix
String
Prefix for the output file's filename.
HTMLOutputPath
String
Sets the destination path for the exported HTML and MHT files.
HTMLVersion
Integer
Sets the HTML format version.
MHTOutput
Boolean
Determines if pages will be exported as MHT archives.
MultiPageOutput
Boolean
Determines whether or not the exported pages will be all on one HTML/MHT page.
TableofContents
Integer
Determines the type of style to use when exporting the table of contents.
Title
String
Sets the web page's title.


 PDF Export Definition

 

Property
Type
Description
AcrobatVersion
Integer
Controls which version of acrobat will load the export. If 0 is entered compression will be disabled.
FileName
String
Specifies the name of the file to which the report will export
JPGQuality
Long
Sets the quality of images exported to pdf.


RTF Export Definition


Property
Type
Description
FileName
String
Specifies the name of the file to which the report will export


Text Export Definition


Property
Type
Description
FileName
String
Specifies the name of the file to which the report will export
SuppressEmptyLines
Boolean
Determines whether empty lines will be inserted for layout purposes
TextDelimiter
String
Specifies the text delimiter to separate field items
Unicode
Boolean
Determines whether the text will be saved as a UNICODE text file



TIFF Export Definition


Property
Type
Description
FileName
String
Specifies the name of the file to which the report will export