Database Reference
In-Depth Information
Figure 5-24. The Invoices and Customers tables (circled) aren't directly related to one another but
use an implicit relationship instead. The database relationships reflect those in the real world of
your business. An invoice is connected to a customer because you created an invoice for a job you
did for that customer. You can use GTRR to easily get a report for your customer about all the in-
voices related to a specific job. And because Invoices are tied to a job, you can even create report
layouts that summarize all invoices by job for any customer (page 597).
You can use tunneling to show a list of all a customer's invoices on the Customer layout. So
on the Customers layout, create an Invoice portal and place the Invoices::Date, In-
voices::Invoice ID, and Invoices::Job ID fields in the portal. Normally, you wouldn't put an
ID field in a portal. In fact, it would probably be a bad idea because it would confuse users
and raise the possibility that the data in a key field could get changed, thus stranding the re-
lated record or connecting it to the wrong parent record. But for this experiment, you want to
see the ID fields so you can see how data tunneling works. While you're violating standard
procedure, throw the Jobs::Job ID field into the Jobs portal. When you're done, your layout
will look something like Figure 5-25 .
NOTE
The sample database for this chapter has Job and Invoice records that already have IDs for Cus-
tomer Jerald Tabb. If you've created Invoice records that are related to Jobs, they'll show up too, so
long as the Jobs are related to a customer record.
Search WWH ::




Custom Search