Hi,
I am using Crystal Reports V10 with ODBC connection to a database and I am struggling to resolve a problem I have with a payroll report. I have two tables linked, one with payroll header information and the other with payroll detail. Ordinary hours value and Tax are held in the header file, while other earning types, for example Annual Leave are held in the detail table. Not every employee in a pay cycle will necessarily have any records present in the detail table as they may only be receiving a standard pay. As such, I have linked the table together with a left outer join and enforced from the header table.
To trap the Ordinary Hours value and Tax value from the Header table, as well as any other Earning types from the Detail Table I have divided my detail section into 3. Da is devoted to Tax, Db to Ordinary Value and Dc to any other (possibly multiple) earning types - eg AL - Annual Leave. Follows is an example:
Employee ET Value Magic Formula
Da Employee1 TAX $$$ ??????????
Db Employee1 ORD $$$ ??????????
Dc Employee1 AL $$$ ??????????
Dc Employee1 SL $$$ ??????????
Currently the "TAX" and "ORD" ET types are simply Text Objects. What I need to do is to be able to incorporate these two details into a "Magic" formula that defines the Earning type based on Detail section a always being TAX and Detail Section b always being "ORD". Is there any way that I can define in a formula what detail section is currently being reported, and have that formula placed on each of the detail sections, displaying the appropriate values. Everything I have tried has failed, as generally it associates Da,Db and Dc with the same record and displays the same ET type on all three. The report format I have is crucial for importing into another application - so I cannot play with it too much. At the end of the day what I need to have is a cross-tab subreport totalling all Earning types values - but it needs to also include the Ordinary Values and the Tax values.
Any ideas? Please!!
Regards
Mark P
I am using Crystal Reports V10 with ODBC connection to a database and I am struggling to resolve a problem I have with a payroll report. I have two tables linked, one with payroll header information and the other with payroll detail. Ordinary hours value and Tax are held in the header file, while other earning types, for example Annual Leave are held in the detail table. Not every employee in a pay cycle will necessarily have any records present in the detail table as they may only be receiving a standard pay. As such, I have linked the table together with a left outer join and enforced from the header table.
To trap the Ordinary Hours value and Tax value from the Header table, as well as any other Earning types from the Detail Table I have divided my detail section into 3. Da is devoted to Tax, Db to Ordinary Value and Dc to any other (possibly multiple) earning types - eg AL - Annual Leave. Follows is an example:
Employee ET Value Magic Formula
Da Employee1 TAX $$$ ??????????
Db Employee1 ORD $$$ ??????????
Dc Employee1 AL $$$ ??????????
Dc Employee1 SL $$$ ??????????
Currently the "TAX" and "ORD" ET types are simply Text Objects. What I need to do is to be able to incorporate these two details into a "Magic" formula that defines the Earning type based on Detail section a always being TAX and Detail Section b always being "ORD". Is there any way that I can define in a formula what detail section is currently being reported, and have that formula placed on each of the detail sections, displaying the appropriate values. Everything I have tried has failed, as generally it associates Da,Db and Dc with the same record and displays the same ET type on all three. The report format I have is crucial for importing into another application - so I cannot play with it too much. At the end of the day what I need to have is a cross-tab subreport totalling all Earning types values - but it needs to also include the Ordinary Values and the Tax values.
Any ideas? Please!!
Regards
Mark P