Jump to content

This topic is 8264 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I'm trying to create an invoice for a small library. There are several related DBs including a Name/Address, Catalog (for books and videos), and Shipping and Handling.

The database with the invoice is a Reservation DB and is a "join" database for the Name/Address and Catalog.

I have a sub-summary part with the fields "SubTotal" (which is a Summary Field; Total Of), which works fine. In the same sub-summary part I have the field "ShipHand::ShipHand.db" (because several items will have one S/H charge). That works fine too. Now I want a field to add these two afore mentioned fields. So, I made a calculation field "Total Balance", which is:

Total Balance = SubTotal + ShipHand::ShipHand.db

However, that doesn't work. It gives me a large number which may be the total of all the invoices. I've tried variations such as:

Total Balance = Sum(SubTotal) + ShipHand::ShipHand.db

but that doesn't work either.

I

Posted

In order to use a summary field in a calculation, you must "extract" the value of this field using the GetSummary(summary field, break field) function. You didn't mention where your are placing your new field, I'm guessing a subsummary or trailing grand summary part. Where the new calculated field is placed changes how the GetSummary function is used. Your field should be:

Total Balance = GetSummary(SubTotal,Subtotal) + ShipHand::ShipHand.db

if "Total Balance" is placed in a Trailing Grand Summary part. It should read:

Total Balance = GetSummary(SubTotal,"break field") + ShipHand::ShipHand.db

if placed in a SubSummary part, where "break field" is replace by the field name the SubSubsummary is "by".

-bd

Posted

Thanks BD. Works like a charm. I wasn't familiar with the "GetSummary" command. Sometimes the most frustrating task has the simplest answer.

Many thanks!

Dan Shanahan

This topic is 8264 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.