Retrieving records calculated field

Meeting place for R&R customers and clients to share tips and ideas. Post your questions, messages or problems here.
Post Reply
Linda
Posts: 17
Joined: Tue Oct 10, 2017 12:44 pm

Retrieving records calculated field

Post by Linda » Mon Jun 17, 2002 4:38 pm

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

kfleming
Posts: 5795
Joined: Tue Oct 10, 2017 12:44 pm

=> Retrieving records calculated field

Post by kfleming » Tue Jun 18, 2002 7:26 am

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

Linda
Posts: 17
Joined: Tue Oct 10, 2017 12:44 pm

==> RE: Retrieve records calculated

Post by Linda » Tue Jun 18, 2002 11:53 am

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

SimonBray
Posts: 33
Joined: Tue Oct 10, 2017 12:44 pm

===> RE: Retrieve records calculated

Post by SimonBray » Wed Jun 19, 2002 11:17 am

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.

kfleming
Posts: 5795
Joined: Tue Oct 10, 2017 12:44 pm

====> RE: Retrieve records calculated

Post by kfleming » Wed Jun 19, 2002 12:43 pm

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

Linda
Posts: 17
Joined: Tue Oct 10, 2017 12:44 pm

=====> RE: Retrieve records calculated

Post by Linda » Fri Jun 28, 2002 12:37 pm

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

kfleming
Posts: 5795
Joined: Tue Oct 10, 2017 12:44 pm

======> RE: Retrieve records calculated

Post by kfleming » Fri Jun 28, 2002 2:57 pm

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

Linda
Posts: 17
Joined: Tue Oct 10, 2017 12:44 pm

=======> RE: Retrieve records calculated

Post by Linda » Fri Jun 28, 2002 4:49 pm

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

Post Reply