Home RAP

Calculation order

edited September 2002 in RAP

I have a problem with the calculation order of different bands. The
basic problem is that I need to calculate a value in a group header and
display the value in the detail. I have a master report and a subreport,
each linked to it's own pipeline. In the group header I need to retrieve
information from the subreport and show it in the detail of the master
report. The subreport is a simple list of names of teachers that taught
a specific course. The master report is a list of students. The report
is basically a certificate. I need the list of teachers, seperated by a
"," and the resulting value is used in the detail band inside a memo
field as part of a larger text.

I have a global variable TeacherList. I also have placed a subreport in
the group header where I calculate the TeacherList value. As a test I
show the individual rows in the detail band.

The basic idea was to populate the Teacherlist variable in the subreport
and then use this value to dynamically fill the memo. However if I use
the global variable, it seems to lag behind 1 page. The first page it
seems to be empty and the second page shows the values that belong to
the first page. So I am not sure if I am doing this the right way.??



  • edited September 2002
    It sounds like you need to loop through the teachers manually in the
    BeforeGeneate event of the main report's detail band, building up the memo
    content. Then let the memo generate, then let the subreport generate. It's
    not really possible to (easily) modify the content generated by a given band
    (in this case the group header) from a band that generates after it (in this
    case the detail band of the subreport.


    Tom Ollar
    Digital Metaphors Corporation
This discussion has been closed.