Header and Footer Output in Inference in Word - Blog
Go Search
Home
Developer's Blog
Products
Languages
InfoCenter
Free Trial
Purchase
Contact Us
  

Home > Blog > Posts > Header and Footer Output in Inference in Word
Header and Footer Output in Inference in Word

One of the features that we added to the most recent release of Inference is the ability to print Expression output to the header and footer regions of Microsoft Word documents. I recently created a sample How-To Guide that illustrates dynamic header and footer output in an Inference in Word document. If you have Inference for .NET installed, you can download the How-To Guide, entitled "Header and Footer Output in Word," from Inference Online:

To print output to headers and footers:

  1. Create an Expression that returns a value.
  2. Enter a Label for the Expression – for example, MyExpression.
  3. In a header or footer, type the Label of the Expression (enclosed in greater than/less than brackets). Example: <MyExpression>.

When the document is executed, the bracketed Expression label placeholders will be replaced with the actual code output from the Expression.

Here are some additional tips:

  • You can use the Output Result property of the Expression to specify whether the Expression gets evaluated in the Word canvas during document execution. This restricts the expression output to only the header or footer.
  • You can use the Alias Code Text property of the Expression to specify whether the code, or the label, is shown in the Word canvas for an Expression. This makes the Word canvas easier to read.
  • If your document includes a Data Frame, you can use an Expression to access its attributes. For example, if your DataFrame includes a title or version number, you can include that in the header/footer of your results document.
  • Header/footer output will also be included in pdf results documents.
  • This same functionality also works in Excel.

In the actual How-To Guide, we create two Expressions that will generate the header and footer output, and then add the placeholders into the header and footer areas of the document:

When the document is executed to a Microsoft Word View, the Expressions are evaluated, and their output replaces those placeholders in the header and footer sections:

That's pretty much it. You can download this How-To Guide from Inference Online and try it out yourself!

Comments

There are no comments yet for this post.
    © 2008 Blue Reference, Inc. All rights reserved. | 3052 NW Merchant Way, Suite 100, Bend, Oregon 97701 | 541-316-2343 | Terms of Use