Please enable JavaScript to view this site.

Vensim Help

Reports are intended to be a simple way to provide formatted numbers that can be printed or reviewed in a convenient fashion.  To accomplish this, there is a simple mechanism for placing data in reports.

If you surround text in the report with backslash \ followed by a forward slash / what is between the slashes will be interpreted as a variable.  The the lines

The annual sales of \sales/ were composed of

material sales of \material sales/ and finished product

sales of \finished sales/

Would allow you to view sales and its two components in a report.  You can accomplish the same things using the :VAR keyword with

The annual sales of \   / were composed of

:VAR SALES

material sales of \  / and finished product

:VAR MATERIAL SALES

sales of \/

:VAR FINISHED SALES

Which is equivalent to

:VAR SALES

:VAR MATERIAL SALES

:VAR FINISHED SALES

The annual sales of \   / were composed of

material sales of \  / and finished product

sales of \/

and to

The annual sales of \   / were composed of

material sales of \  / and finished product

sales of \/

:VAR SALES

:VAR MATERIAL SALES

:VAR FINISHED SALES

The most valuable use of the :VAR keyword is for the case in which the variable, with the specification of its run, time base, time to be chosen and so on is quite long.  To maintain some amount of alignment in the report using \ / with an appropriate number of spaces in between (the spaces are ignored when the output is created) can be helpful.  

Note that if you use \/ and :VAR you can put the :VAR lines anywhere, but the number of them must match the number of \/s you have entered.  Also note that the order of the :VAR lines is the order in which they will be used.

Whether it appears explicitly in =@1992/ or in a }:VAR line, the variable name can be followed by the various controls described in "Getting Variable Values" above.

Example

:REPORT Status Report
Status of the ecosystem in year \Time%g/ (experiment \DATASET/)
 
Population (organisms)        \Population/
Crowding                \Crowding/
Birth Rate (organisms/year)        \births/
Death Rate (organisms/year)        \deaths/

:END-OF-REPORT

Results in: