I am a financial guy but was asked to optimize a payroll jet report.
I have attached (modified) it for you to see.
First thing it does is use Jet to give you a list of employees.
Then it lists all the payroll control codes (hard coded) as columns. 33 of them.
Each column uses an NL Sum to get the result it needs. I can see why this report takes forever (they say it takes over a day to run), because if they have 150 employees, each employee record hits the PLE table 33 times. The payroll ledger entry table is the biggest …..
Anyone have any ideas how to optimize it? Let me know, thanks !!!!
3 comments
-
Jet Reports Historic Posts Firstly, I'd use an NL("Columns") function to replicate your 33 columns out - it won't save any time but makes the report easier to maintain.
Secondly, look at what key the report is using. Check your keys on the Payroll Ledger Entry table - ensure you have one that has matches your Nl(sum), i.e.:
- Amount
- Payroll Control Code
- Employee No.
- Pay Cycle Period
- Posting Date
I'd make this change in a test/dev environment first. I'd also make the key in the same order as above and also try it without the 'Amount' column. -
Jet Reports Historic Posts Just to clarify,
I think you want a key defined as
- Payroll Control Code
- Employee No.
- Pay Cycle Period
- Posting Date
with a SUMINDEX of Amount -
Jet Reports Historic Posts Good point chuck!