Home RAP
New Blog Posts: Merging Reports - Part 1 and Part 2

Accumulating Totals from a Subreport

edited August 2006 in RAP
Hi,
I am working with a landscaping package that has an embedded Reportbuilder
and I am using the RAP capability.

The report in question has a single group detail band with a single
subreport.
The report lists services performed and lists materials used via the
subreport.
I calculate a service price into a variable and accumulate it in a Global
Variable (Job Totals).
I calculate a material price in the subreport into a variable and accumulate
it in the same Global Variable (Job Totals).

The report works correctly except when the last item for a job is a material
item from the subreport.
When this happens the material prices from the subreport are not accumulated
in the Global Variable.
If the last item has no materials the Global Variable amount is correct.

I have tied every thing I could think of to change the timing of the process
with no results.
Does any one have an idea why the subreport totals are not added to the
Global Variable when the subreport is the last item in the group?

Thanks and Regards,
Marty Samojedny

Comments

  • edited August 2006
    Hello,
    as an idea i would create a Stringlist. make an
    List.Add(FloatToStr(xxxx)+';'+FloatToStr(yyyy)) where xxx is your value to
    add and yyy is the value of your global variable. in report after print,
    save the stringlist to c:\. So you can look the result in a texteditor.
    mostly there is a timing problem and events can be much complex sometimes.
    under
    http://www.eulanda.de/inside/entwicklerhandbuch/pascal/referenz/weitere/stringlist/stringlist.htm
    you will find a description of the stringlist functionality. Its german, but
    the samples and outputs are also usefull to see the methods of that object.


    best regards
    chris
    www.eulanda.de
    ERP Systems



This discussion has been closed.