public ReportResult fillWithData ( String dirPath, Map params, IDocumentDataSource dataSource, DataPresentationTemplate template, IDocEngineHelper helper, IDomainVersion domainVersion, int outputFormat, boolean printResults, int numCopies) throws DocumentException
This method is called by Aware IM at run time when a particular document template is processed. The method is supposed to replace tags used in the document template with the appropriate attribute values. The values must be obtained from the provided data source – see IDocumentDataSource interface. The overall structure of the method must be as follows:
reset
method of the provided data source to position it on the first element.BinaryResource
) from the original template that will have tags replaced with their value.getExpressionValue
method of the provided data source to calculate the value of the expression used inside the tagSee also the example.
dirPath | the name of the directory where the template file is stored |
params | can be ignored |
dataSource | the source of data for the values of the tags. See the IDocumentDataSource interface. |
template | the document template which is being filled with data |
helper | can be ignored |
domainVersion | the business space version where the document template is defined |
outputFormat | can be ignored |
printResults | if true the resulting document(s) should also be sent to the printer |
numCopies | number of copies to print (only if printResults is true) |
A structure represented by the ReportResult
object. The first document created at the step 3 must be set into this structure as the BinaryResource
. All other documents must be stored on disk as files. Full path names of the files must be set into the ReportResult
structure.
the DocumentException
if error occurs.