Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How To Pull Report Data
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00931813
Message ID:
00931843
Vues:
24
Kevin,

First, a question...in general, how are you defining your data layout at design time in Crystal, and how are you setting your datasource at runtime?

I don't know if this will help, but here's a basic example...

Let's say you have two tables...INVHDR and INVLINE. A user wants to see a report of all invoices for a given customer, from 01/01 to present. You create a query that brings back 10 InvHdr records and 50 corresponding InvLine records.

This assumes that you've previously laid out a report where you set up a structure for INVHDR and INVLINE. You linked the two in the Crystal Linking expert based on INVNO. In the report, you create a group header band, based on INVNO. You show the Invoice # and Inovice Date and other information related to the Invoice header. In the Detail band, you show the Line item information from INVLINE (product, quantity shipped, unit price, etc.). In the group detail band, you show a calculated total of qty shipped * unit price, and any other summarized information from the details.

Because you told Crystal you wanted to link INVHDR to INVLINE based on INVNO, when it sees a group band of data from INVHDR and a detail line from INVLINE, it knows how to keep the linking straight, so that it will display
Group Header  12345   01/01/01  Acme
Detail                               Butter       5.00/cs   100 cases     $500.00
Detail                               Eggs         2.00/cs   200 cases     $400.00


Group Footer      Totals                                                  $900.00
and then it goes onto to the next invoice #, based on the data that you passed/pushed into Crystal at runtime.

Think of the visual linking expert as the equivalent of a SET RELATION. If you have more tables and more relationships, you'd link them as well and set your groups in Crystal accordingly.

Kevin
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform