Hello,
I have a question about the use of external & calculated fields in my reports.
I basically have a report which has a linked report in it. Let's name the parent report 'Report A' and the child report 'Report B'. A is of free-form type. B is a layout-table.
Report A
Contains a Group Header, a Detail section (which contains Report B), a Report Footer and a Page Footer for Report section. The Group part surrounds only the detail section, but I don't need a Group Footer part.
Report B
I have a Detail section, surrounded by a Group Header and Group Footer section, nothing else. I also have a ton of calculated fields defined. The Header section merely has a title field, the title being extracted from the data base. The Detail section contains, well, the detailed records I need. And finally, the Footer section, prints some totals. For example, let's say 3 totals. 'Total 1' equals the sum of a field ('Price', for example) in the detail section. 'Total 2' equals 'Total 1' plus 10% of 'Total 1'. And last, but not least, 'Total 3' equals 'Total 2' plus 20% of 'Total 2'. Yes, it's a little bit overwhelming, but the important thing is that 'Total 3' is calculated successively and is the final value we're actually interested in. Now, this report prints me 2 separate groups, breaking on a certain ID. First group (Group 1) has a Title ('Title X', for example), certain records in Detail and a final 'Total 3' printed. Second group (Group 2) has a different title ('Title Y'), different records in Detail and an other final 'Total 3' printed, different from the one in Group 1.
Hope this is a good description - my reports are pretty complicated to describe them fully, so I largely summarized the structure of them.
What I need to is to do some calculations and send it via a new field to Report A.
Let's say Total3 for Group 1 equals 1200 and for Group 2 equals 280. We also have two percentages, N = 20% and M = 50%.
Here are the equations I need to do:
Value1 = if(Title = "Title X", (Total3 * N)/100, 0)
Value2 = if(Title = "Title Y", (Total3 * M)/100, 0)
Sum = Value1 + Value2
So if we do the math with the above presented data, for Title X, Value1 equals 240 and for Title Y, Value2 equals 140. Sum equals 380.
I need to send the field 'Sum' to Report A as an External Field and print 380. I print it in the detail section of Report A.
The problem is that it will only send 140. My guess is because these calculated fields reset at the end of each group. So yes, Report B does print the two values separately, but I can't seem to find a way in printing the Sum as 380 with the above mentioned structure, in neither of the Reports.
Do you have any idea how could I solve this problem?
Thanks in advance!
David
I have a question about the use of external & calculated fields in my reports.
I basically have a report which has a linked report in it. Let's name the parent report 'Report A' and the child report 'Report B'. A is of free-form type. B is a layout-table.
Report A
Contains a Group Header, a Detail section (which contains Report B), a Report Footer and a Page Footer for Report section. The Group part surrounds only the detail section, but I don't need a Group Footer part.
Report B
I have a Detail section, surrounded by a Group Header and Group Footer section, nothing else. I also have a ton of calculated fields defined. The Header section merely has a title field, the title being extracted from the data base. The Detail section contains, well, the detailed records I need. And finally, the Footer section, prints some totals. For example, let's say 3 totals. 'Total 1' equals the sum of a field ('Price', for example) in the detail section. 'Total 2' equals 'Total 1' plus 10% of 'Total 1'. And last, but not least, 'Total 3' equals 'Total 2' plus 20% of 'Total 2'. Yes, it's a little bit overwhelming, but the important thing is that 'Total 3' is calculated successively and is the final value we're actually interested in. Now, this report prints me 2 separate groups, breaking on a certain ID. First group (Group 1) has a Title ('Title X', for example), certain records in Detail and a final 'Total 3' printed. Second group (Group 2) has a different title ('Title Y'), different records in Detail and an other final 'Total 3' printed, different from the one in Group 1.
Hope this is a good description - my reports are pretty complicated to describe them fully, so I largely summarized the structure of them.
What I need to is to do some calculations and send it via a new field to Report A.
Let's say Total3 for Group 1 equals 1200 and for Group 2 equals 280. We also have two percentages, N = 20% and M = 50%.
Here are the equations I need to do:
Value1 = if(Title = "Title X", (Total3 * N)/100, 0)
Value2 = if(Title = "Title Y", (Total3 * M)/100, 0)
Sum = Value1 + Value2
So if we do the math with the above presented data, for Title X, Value1 equals 240 and for Title Y, Value2 equals 140. Sum equals 380.
I need to send the field 'Sum' to Report A as an External Field and print 380. I print it in the detail section of Report A.
The problem is that it will only send 140. My guess is because these calculated fields reset at the end of each group. So yes, Report B does print the two values separately, but I can't seem to find a way in printing the Sum as 380 with the above mentioned structure, in neither of the Reports.
Do you have any idea how could I solve this problem?
Thanks in advance!
David
Comment