RAP example of Group % totals
RB7.02 D6 End User reporting.
Can you post an example that uses RAP in an end user report to do
something like:
Group City: Los Angeles Total: 50 out of 200 25%
Detail: PersonA Total 10 20% of City 10% total
Detail: PersonB Total 40 80% of City 20% total
Group City: New York Total: 150 out of 200 75%
Detail: PersonA Total 100 67% of City 50% total
Detail: PersonB Total 50 33% of City 25% total
No sub reports.
What would be the major changes if there were sub reports?
Thanks
Rick Matthews
Dartek Systems Inc.
Can you post an example that uses RAP in an end user report to do
something like:
Group City: Los Angeles Total: 50 out of 200 25%
Detail: PersonA Total 10 20% of City 10% total
Detail: PersonB Total 40 80% of City 20% total
Group City: New York Total: 150 out of 200 75%
Detail: PersonA Total 100 67% of City 50% total
Detail: PersonB Total 50 33% of City 25% total
No sub reports.
What would be the major changes if there were sub reports?
Thanks
Rick Matthews
Dartek Systems Inc.
This discussion has been closed.
Comments
One way to perform calculations like this is to create a summary query that
contains the summarized totals. Then link it to the detail query and the
calculations are very simple.
This example shows another approach in which look ahead values are used to
perform the calculation.
http://www.digital-metaphors.com/tips/CalcUsingLookAheadValuesRAP.zip
We have not tested using subreports, so I am not sure whether the same
approach will work or not. Definitely the summary query approach would work.
--
Nard Moseley
Digital Metaphors
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
I get most of the example but the footer using SaveToCache I am
unclear on. Can you explain the intent? Also in your example for me
the SaveToCache shows up twice in the objects list in RAP.
Is there any plan to make this easier? I don't have even a slim hope
of explaining how to do this to any regular non programmer user. It
is just too convoluted and brittle for something that is quite a
common request.
Thanks,
totals are conditional and can't be done with TppDBCalc?
TppVariable has GetLookAheadKey but not GetLookAheadString that I can
see?
Thanks,
One simple way to calculate this type of stuff is to create a summary query
that contains the group totals. Then you do not need two passes.
At the end of each page, the TppVariable needs to update its internal cache
with the intermediate results. This is required when a group breaks across
pages.
--
Nard Moseley
Digital Metaphors
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
I researched this and you are correct. This technique is currently limited
to DBCalc.
I will add this to the ToDo list....
You want to consider using the summary query technique that I mentioned
above. Or perhaps pre-process the data and store it in a summary table -
that can make things very simple for end users.
--
Nard Moseley
Digital Metaphors
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
The TmyTppVariableRTTI class is no longer needed for the example. I think
that is why you are seeing SaveToCache listed twice in the code toolbox.
--
Nard Moseley
Digital Metaphors
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com