SetPromptValue Function

Applies To  

Overwrites one of the values for a particular prompt.

Syntax
SetPromptValue(
    IPROMPTSET_HANDLE i_hIPromptSet,
    int i_iPromptNum,
    int i_iValueIndex,
    PromptValuesType i_valueType,
    ConstChar* i_promptValueInfo1,
    ConstChar* i_promptValueInfo2)
    Parameters

i_hIPromptSet [In]

The handle to the IPromptSet interface. See hIPromptSet Variable.

i_iPromptNum [In]

The prompt's index number.

i_iValueIndex [In]

The prompt value's index number.

i_valueType [In]

The prompt value type. This should be the same as the current prompt value type; it cannot be changed.

i_promptValueInfo1 [In]

The prompt value to be set in the first buffer.

i_promptValueInfo2 [In]

The prompt value to be set in the second buffer. See GetPromptValue Function.

Returns

Each function returns a RET_VALUE that is an error code of type Long. The return value is greater than zero if the call was successful, and zero or less if not. Use RET_OK(x) and RET_ERROR(x) to check for failure.

Remarks

The prompt value type will be one of the following:

Constant Value Description

pvalue_single

0

A discrete value.

pvalue_range

1

A ranged value.

If the prompt value type is discrete, then only a single prompt value is required as a parameter. If the prompt value type is ranged, then two prompt values are required.

Note:    You cannot change prompts for an instance unless you refresh the instance. If you want to change prompt values, apply the processing extension to the report before you schedule the report.



Crystal Decisions, Inc.
http://www.crystaldecisions.com
Support services:
http://support.crystaldecisions.com