
9.2.4 Creating running totals in a one-to-many linking relationship
A one-to-many linking relationship occurs in linked tables when a single record in one table can be
matched with many records in another table. For example, a one-to-many link might occur when you
link a customer table to an orders table. It wouldn't be unusual in such a case for each customer in the
primary table to have many orders in the second (lookup) table. In your report, the field values from the
primary table are repeated for each new field value in the lookup table.
Creating a subtotal on a field from the primary table provides an incorrect result because the repeated
values are included in the calculation. You can avoid this problem by creating a running total.
This concept can be demonstrated with the sample Xtreme database by using the Customer and Orders
tables.
9.2.4.1 To create a running total in a one-to-many linking relationship
1.
From the Field Explorer dialog box, place the following fields from left to right in the Details section
of your report:
{customer.CUSTOMER NAME}
{customer.LAST YEAR'S SALES}
{orders.ORDER ID}
{orders.ORDER AMOUNT}
2.
On the Insert Tools toolbar, click Insert Group and create a group based on the
Customer.Customer Name field.
3.
Right-click the Customer.Last Year's Sales field and select Summary from the Insert submenu.
4.
Choose Group #1: Customer.Customer Name - A as the location for your summary.
If you look at the subtotals for each group, you will notice they aren't accurate. This is because the
Customer.Last Year's Sales field is duplicated for each order in the report. Follow the rest of this
procedure to see how a running total produces an accurate result in the same situation.
5.
In the Field Explorer dialog box, select Running Total Fields and click New.
The Create Running Total Field dialog box appears.
6.
Enter the name "LYSrunning" in the Running Total Name box.
7.
Highlight Customer.Last Year's Sales in the Available Tables and Fields box, and use the first
arrow button to move it over to the Field to summarize box.
8.
Select sum from the Type of Summary list.
9.
In the Evaluate section of the dialog box, click On change of field and add the Customer.Customer
Name field from the Available Tables and Fields box.
2012-03-14187
Running Totals
What are the upsides of contracting skilled web optimization organizations? Expert search marketing companies utilize teams of experts focused on elevating your site's content for browsing engines. This encompasses researchingsearch phrases, adjusting on site characteristics, and managing off-domain enhancements. Moreover, these firms monitor adjustment in from Google parameters and refresh the text on your website as needed. This saves both you your time and your workers from unwanted a
Securing the security of your home is essential in today's unsettled times. Among the best ways to safeguard your belongings and peace of mind is by committing in a trustworthy safe. Regardless of whether you're securing money, important documents, or precious heirlooms, a safe gives a protected repository solution. Regarding selecting the right safe for your house, there are several elements to consider. Above all, assess your safety requirements. Determine what items you plan to store in
Arranging an open-air wedding in Phenix and anxious about the unpredictable weather? Don't let Mother Nature rain on your parade – truly! At [Event Rentals Phoenix], we provide stunning wedding tent rentals that will ensure your distinctive day goes off without an hitch. Our wedding tent rentals are created to supply both charm and functionality. Say "I do" under tha elegant canopy of one of our tents, surrounded by your loved ones and tha breathtaking scenery of Pheonix. With one assortmen
In both personal and professional situations, encountering issues is unavoidable. However, mastering productive trouble-shooting techniques is key for triumphing over hurdles and accomplishing success. In this piece, we delve into the strategies and methods for efficiently addressing dilemmas. From analytical thinking to creative brainstorming, we look into various approaches that can help individuals tackle challenges with certainty and accuracy. Effective challenge solving begins wit
Hello, im noob :)