There is already a basic P&L Financial Report in Compiere that works the same way as the Balance Sheet.
These reports are generated when u want them. First they are based on settings and definitions in the Report Row and ColumnSet (find all of them in the same place under Financial* in the main menu tree).
The generation will produce a table called T_Report, which stores the accounting data and then that is printed under the PrintFormat module.
During generation u can specify Period and offsets. U have to go thru one in GardenWorld to grasp it