A method and apparatus, including a computer program apparatus,
implementing techniques for generating a report from a technical
computing environment provided by a mathematical computer program. A
report generator defines a set of reporting components that can be
assembled to form a report template and processes the reporting
components of the report template in order to extract data from the
mathematical computing environment and generate the report. The report
generator includes a user interface by which a designer can
hierarchically assemble the reporting elements, which are defined
according to an object-oriented programming language. The report
generator bi-directionally communicates with the mathematical computing
environment such that the report generator can evaluate expressions
defined within the mathematical computing environment, change initial
conditions and parameters of a mathematical model, and issue commands to
advance the simulation time of the model. The report generator includes a
generation engine that generates an intermediate representation of the
report and a transformation engine that transforms the intermediate
representation into an electronic document according to a user-selected
format.