Determines which field caused a group total to be calculated.
This determines which field changed contents and thereby concluded
a group.
|
FieldNo := TOTALSCAUSEDBY
|
Property Value/Return Value
Type: Integer
The number of the field that caused the group to end and a group
total to be calculated.
Remarks
Example
This example shows how to use the TOTALSCAUSEDBY
function to design a report where you group records according to
the contents of several fields and you do not want to print the
group header section when the item number changes. Use the
following C/AL code in the OnPreSection
Trigger of the section. To view code in section
triggers, on the View menu, click Sections, and then
on the View menu, click C/AL Code.
This example requires that you create the following
variable.
Name |
Data type |
Subtype |
ItemRec
|
Record
|
Item
|
|
Copy Code |
IF CurrReport.TOTALSCAUSEDBY = ItemRec.FIELDNO("No.") THEN
CurrReport.SHOWOUTPUT(FALSE);
|
See Also