Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

Default Values for Simple Types (Crystal Syntax)

Visual Studio 2005

An uninitialized variable will have the default value for its type. In general, it is not a good programming practice to rely on the default values of types. For example, initialize all local variables in your formula, initialize all global variables in a formula placed in the Report Header and initialize all shared variables in a formula placed in the Report Header of the main report.

When an array is resized using the Redim keyword, the entries are filled with default values for the type.

Default values






"" //The empty string


Date (0, 0, 0) //The null Date value


The null Time value. Value held by an uninitialized Time variable.


The null DateTime value. Value held by an uninitialized DateTime variable.

Note   It is not recommended that your formulas rely on the values of uninitialized range or array variables.

See Also

Simple Data Types (Crystal Syntax( | Variables (Crystal Syntax)

© 2015 Microsoft