Use PEGetGroupCondition to determine the group condition information for a selected group section in the specified report. Use this function to retrieve the group condition for a group section and use PESetGroupCondition, to change the group condition once it is known.
BOOL CRPE_API PEGetGroupCondition (
short printJob,
short sectionCode,
HANDLE FAR *conditionFieldHandle,
short FAR *conditionFieldLength,
short FAR *condition,
short FAR *sortDirection );
Specifies the print job that you want to query to determine the group conditions for a selected group. | |
Specifies the Section Codes, for the report section for which you want to get the group condition. See Working with section codes. | |
Specifies a pointer to the handle of the condition field for the selected group section. | |
Specifies a pointer to the length of the condition field for the selected group section. | |
Specifies a pointer to the condition setting for the selected group section. See Remarks below. | |
Specifies a pointer to the sort direction setting for the selected group section. Uses one of the PE_SF_XXX Sort Order Constants. |
The condition parameter returns a value that encodes both the condition and the type of the condition field. You need to apply a condition mask (PE_GC_CONDITIONMASK) or a type mask (PE_GC_TYPEMASK) against this value using a bitwise AND to determine the condition or type respectively. For example:
short result; result = *condition & PE_GC_TYPEMASK; if (result == PE_GC_TYPEDATE)
{
//what you want it to do
}
Type can be any of the following PE_GC_TYPEXXX constants:
Declare Function PEGetGroupCondition Lib "crpe32.dll" (ByVal printJob As Integer, ByVal sectionCode As Integer, ConditionFieldHandle As Long, ConditionFieldLength As Integer, Condition As Integer, SortDirection As Integer) As Integer
function PEGetGroupCondition (
printJob: Word;
sectionCode: integer;
var conditionFieldHandle: Hwnd;
var conditionFieldLength: Word;
var condition: Word;
var sortDirection: Word
): Bool stdcall;
| Seagate Software IMG Holdings, Inc. http://www.seagatesoftware.com Support services: http://support.seagatesoftware.com |