BuildReport

BuildReport(Document, object)

Populates the specified template document with data from the specified source making it a ready report.

public bool BuildReport(Document document, object dataSource)
Parameter Type Description
document Document A template document to be populated with data.
dataSource Object A data source object.

Return Value

A flag indicating whether parsing of the template document was successful. The returned flag makes sense only if a value of the Options property includes the InlineErrorMessages option.

Remarks

Using this overload you can reference the data source’s members in the template document, but you cannot reference the data source object itself. You should use the BuildReport overload to achieve this.

A data source object can be of one of the following types:

For information on how to work with data sources of different types in template documents, see template syntax reference (https://docs.aspose.com/display/wordsnet/Template+Syntax).

See Also


BuildReport(Document, object, string)

Populates the specified template document with data from the specified source making it a ready report.

public bool BuildReport(Document document, object dataSource, string dataSourceName)
Parameter Type Description
document Document A template document to be populated with data.
dataSource Object A data source object.
dataSourceName String A name to reference the data source object in the template.

Return Value

A flag indicating whether parsing of the template document was successful. The returned flag makes sense only if a value of the Options property includes the InlineErrorMessages option.

Remarks

Using this overload you can reference the data source’s members and the data source object itself in the template. If you are not going to reference the data source object itself, you can omit dataSourceName passing null or use the BuildReport overload.

A data source object can be of one of the following types:

For information on how to work with data sources of different types in template documents, see template syntax reference (https://docs.aspose.com/display/wordsnet/Template+Syntax).

See Also


BuildReport(Document, object[], string[])

Populates the specified template document with data from the specified sources making it a ready report.

public bool BuildReport(Document document, object[] dataSources, string[] dataSourceNames)
Parameter Type Description
document Document A template document to be populated with data.
dataSources Object[] An array of data source objects.
dataSourceNames String[] An array of names to reference the data source objects within the template.

Return Value

A flag indicating whether parsing of the template document was successful. The returned flag makes sense only if a value of the Options property includes the InlineErrorMessages option.

Remarks

Using this overload you can reference multiple data source objects and their members in the template. The name of the first data source can be omitted (i.e. be an empty string or null) if you are going to reference the data source’s members but not the data source object itself. Names of the other data sources must be specified and unique.

If you are going to use a single data source, consider using of BuildReport and BuildReport overloads instead.

A data source object can be of one of the following types:

For information on how to work with data sources of different types in template documents, see template syntax reference (https://docs.aspose.com/display/wordsnet/Template+Syntax).

See Also