Determine order of batch reports

When printing a batch of reports how is the print order determined?

Examples would be:

Paychecks: How to control whether they print in alphabetical order by name or numeric by check number.

Invoice: How to control whether they print numerically by invoice number or alphabetically by customer name.

Is this controlled by the current key on the table? Or is there some other setting like in request page?

Related