Skip to main content

Naming Conventions for Report Object Variables

When you use report object variables in CDM, you should follow a naming convention, so that it will be easy to understand the purpose of each variable.

When you are planning the naming convention for your report object variables, be careful to select a pattern that CDM can interpret correctly when it compiles your report. Best practice is to create the name of a report object variable in the following order:

  • Two pound signs to indicate that this is a variable.
  • A number to indicate the numbering of the variable.
  • A word to indicate the type of item represented by the variable.

In the following incorrect example, the number follows the word and can cause an error when CDM compiles your report:

Variable

Result

##SCash1
##SCash2
##SCash3
...
##SCash11

When the report is compiled, a search is performed for all instances of the variable ##SCash1. Two are found because ##SCash11 is incorrectly included in the search results. Best practice: keep the numbers at the beginning of the string to avoid this error.

In the following correct example, the variables are changed so that the number precedes the word:

Variable

Result

##1SCash
##2SCash
##3SCash
...
##11SCash

When the report is compiled, a search is performed for all instances of the variable ##1SCash. Only one instance is found.

Was this article helpful?

We're sorry to hear that.