This topic is locked

Modify Report Data

1/14/2009 7:18:41 AM
PHPRunner General questions
author

Dear all,
I have a very "special" problem regarding a report page used for analyzing our timerecording data:
In my report there are few fields filled from a database, e.g. "Employee", "Initial", "Department", "Activity" and "TOTAL" (total means the total time an employee works on a activity within a certain period of time). For some reasons I can not use the TOTAL-values that results from the database-query, but I have to modify them.
To handle this the total-field contains custom-code that does a lot of calculations before displaying the modified-values.
The query results in a report like this
STUDY CODE:xy // First group

INITIAL 1 // Second group

Name-Department-Activity 1 -Total

Name-Department-Actitvity 2 - Total

Total for Initial 1

INITIAL 2

[...]

Total for Initial 2
TOTAL FOR STUDY CODE XY
So far so good!
The problem is as follws:
If I display the content of the $data arrays within the custom function it shows something like that
Array{

[proj_key] = x

[department] = x

[initial] = x

[hours] = x

}
Array{

[Total] = x // TOTAL FOR GROUP INITIAL

}
Array{

[proj_key] = x

[...]

}
Array{

[Total] = x // FROM MY POINT OF VIEW THIS IS THE TOTAL FOR THE WHOLE STUDYCODE

}
Array{

[Total] = x // FROM MY POINT OF VIEW THIS IS THE TOTAL FOR THE GROUP INITIAL

}
Now my question:
Could you please give me some information why both totals at the end of the loop are in the wrong order? Is this a bug? I need to place them in the correct order, but I don't know where I can found the loop that builds the report...
Please understand that I am not allowed to send you my source-code, because I am working for a pharmacy company that have very high security guidelines, but hopefully you can help me.
With regards