Can I capture data in summary/subsummary fields?

Can I capture data in summary/subsummary fields?

Post by Siri Hari Hari Singh Khals » Wed, 21 Aug 2002 05:30:51



I have my summary and sub summary fields working
great. I want to use that data in a calculation
in another field. Is there some way I can capture
and use that data in "Browse" mode???? TIA
 
 
 

Can I capture data in summary/subsummary fields?

Post by Maire Bla » Wed, 21 Aug 2002 21:15:16


You can use the Getsummary function to use the results of subsummaries
in calculations, but it is only correct when the file is correctly
sorted according to your subsummary part.

You could create a number field to hold the result, then create a
script which sorted the file correctly and used the Setfield script step
to loop through all your records and set this number field to the value
of the getsummary field. This would hold the value until you ran the
script again, no matter how the file was sorted in the meantime.

This would be the only way to show values from a variety of differently
sorted subsummaries in Browse mode. Obviously you would need a different
sort and loop for each one.

A different way to show the same results is to use a self-join
relationship and use the ordinary sum function in a calc which sums the
required field *through the relationship*. So if the self-join
relationship is based on the same field as your subsummary part, the sum
of the required field via the relationship should be the same as the
subsummary total. This could be useful in cases where the subsummaries
are not very complex, and of course it keeps up with changes without the
need to run a script. The sum has to be via the relationship.

Hope this helps.

Maire Black


Quote:> I have my summary and sub summary fields working
> great. I want to use that data in a calculation
> in another field. Is there some way I can capture
> and use that data in "Browse" mode???? TIA


 
 
 

Can I capture data in summary/subsummary fields?

Post by Keith Dufo » Wed, 21 Aug 2002 22:57:45


Write a script and use the GetSummary Function and stuff the results
into another field.
 
 
 

1. Still trying to get subsummary data into another field

I've reached a dead end trying to get info from a subsummary field into
another calulation field. More exactly I have a script that will do it for a
single subsummary field that works fine, but when I run a script for another
subsummary field the data disapears from the former scripted field.

The file keeps track of the types of credit students get for classes (they
can get different credit for the same class) and the amount of credit for
each class. The file is set to give a subsummary of the total amount of
credit the've accumulated with the "credit type" field as the break field.
When I enter Preview mode the file works fine, sorting the various classes by
credit type and giving me a subtotal of the various credit types. I want to
take these totals and compute how much more credit of each "credit type"
students need on another layout that lists the total credit amount they've
completed and how much more they need. I have a script for each credit type
that finds the various credit types (about 20) from a global, which sets the
"find", then I use Setfield to set the data into the layout and perform a
calculation. The data appears in the correct field, but as soon as i run
another script the data disapears. How can I get it to remain as I run the
various scripts????

2. Viruses and Pick

3. Summary fields or Summary table?

4. URGENT REPLY!

5. How to make calculations based on several summary fields included in a sub-summary part

6. No Idea how to start the Informix-Server-Process on Solaris :(

7. Repeating Field in Subsummary Report

8. cperf in ESQL/C 5.0

9. importing subsummary field

10. Display Subsummary Fields on Web?

11. Help Request: using results of Subsummary fields

12. Exporting summary field data

13. Basic Question - Subsummary data