Basic Syntax CrystalClear Syntax While Printing Records

StorexxxVar(key, value)
FetchxxxVar(key)


With the StorexxxVar and FetchxxxVar functions it is possible to exchange values between formulas in main and subreport. Values from a subreport and the main report can be passed to other subreports and vice versa.

Unlike shared variables, it is possible to use dynamic keys like database fields or parameter field values.

StorexxxVar functions

The following functions are available to store values:

StoreBooleanVar(key, BooleanValue)
StoreCurrencyVar(key, CurrencyValue)
StoreDateVar(key, DateValue)
StoreNumberVar(key, NumberValue)
StoreStringVar(key, StringValue)

Parameters:

key Case sensitive name to identify the value. Can be a dynamic name, e.g. a database field.
xxxValue The value for the specified key.

Returns:

The value of the specified key.

FetchxxxVar functions

The following functions are available to fetch values:

FetchBooleanVar(key)
FetchCurrencyVar(key)
FetchDateVar(key)
FetchNumberVar(key)
FetchStringVar(key)

Parameters:

key Case sensitive name to identify the value. Can be a dynamic name, e.g. a database field.

Returns:

The value of the specified key.

Examples:

// Formula "Initialize" should be placed in a section of the main report 
// that is above to the section containing the subreport. 
StoreNumberVar( "x", 0)

// Formula "Summarize" should be placed in a section of the subreport.
StoreNumberVar( "x", FetchNumberVar("x") + 1)

// Formula "Print Value" can be used in sections below the subreport. 
FetchNumberVar("x")

See also:


i-net software strives to provide accurate product documentation. Please give us your feedback using the form below.
NOTE: This form is for documentation feedback only. For technical assistance, please send an email to crystalclear@inetsoftware.de.

This page is: very poor very good
Comment: