In Logic Pro, do one of the following:
Select either the main track or a subtrack, then choose Track > Flatten Stack.
Control-click the track header of the main track or a subtrack, then choose Flatten Track Stack from the shortcut menu.
Download the guides:
Logic Pro User Guide: PDF