Page 1 of 1
Retrieving records calculated field
Posted: Mon Jun 17, 2002 4:38 pm
by Linda
I have a report that I generated with R&R 9.0. The report has calculated fields, one of which taked a calculated field and calculates a total (in this case gp amount). The GP amounts can range anywhere from 100% to -100%. But I only want to retrieve those records that have a total GP amount of 20% or less. Is there a way I can sort on a calculated field. I tried using the Database query but gpamt is not a field but rather a calculated field.____I have gotten so much help in this forum I figured I would try again.____Thanks in advance,____Linda
=> Retrieving records calculated field
Posted: Tue Jun 18, 2002 7:26 am
by kfleming
If your field is a total field, you need to edit its options and make it pre-processed in order to use it in a query.____Kathleen__R&R Support
==> RE: Retrieve records calculated
Posted: Tue Jun 18, 2002 11:53 am
by Linda
Thanks for your reply.____However the field is a calculated field not a total field so there is an expression therefore does not give me an option to preprocess.____Is there a way to run a query on a calculated field?____Thanks again,____Linda
===> RE: Retrieve records calculated
Posted: Wed Jun 19, 2002 11:17 am
by SimonBray
Linda,__Have you checked whether maybe the calculated field is a calulation that uses one or more total fields ? In which case you need to set the total fields it uses to be pre-processed.____Simon.
====> RE: Retrieve records calculated
Posted: Wed Jun 19, 2002 12:43 pm
by kfleming
And if the calculation uses both table fields and total fields, even if those totals are pre-processed, you will not be able to use this field as a sort.____One workaround is to export the report fields to a DBF and then use that DBF as the master file for a new report. This turns everything into a database field available for sorting.____Kathleen__R&R Support
=====> RE: Retrieve records calculated
Posted: Fri Jun 28, 2002 12:37 pm
by Linda
I have a totprc field which is a "total field" and I have it set on "running." Then I have a totcst field which is also a "total field" and I have it set on "running." Then I have a totgp field which is a "calculated field" and the expression is "(totprc-totcst)/totprc"____So the total GP is calculated on 2 "total" fields to give me the total GP. This amount can be anywhere between -100% to 100%. But I only want to see the records that have a total GP of 20% or less. I don^t really want to export this into another database as I will be running this every week for particular periods.____Is there a way to print out a report based on the above criteria in __R & R?____Thanks to all who have been replying.____Linda
======> RE: Retrieve records calculated
Posted: Fri Jun 28, 2002 2:57 pm
by kfleming
You could create a calculated field with expression GP<20 and then use that to logically print the group footer only when that calc was true.____Kathleen__R&R Support
=======> RE: Retrieve records calculated
Posted: Fri Jun 28, 2002 4:49 pm
by Linda
Great idea! I immediately did just that but it is still printing all the records instead of only those 20% or less. Is it because the "totgp" is a calculated field already? Can you create a calculated field based on another calculated field?____Thanks,____Linda