Navodila za PANTHEON

 Kazalo
 Glavna stran - Dobrodošli v PANTHEON navodila
[Collapse]PANTHEON
 [Collapse]Vodiči za PANTHEON
  [Collapse]Vodič po PANTHEON-u
   [Expand]Pomoč
   [Collapse]Nastavitve
    [Expand]Subjekti
    [Expand]Identi
    [Expand]POS
    [Expand]Proizvodnja
    [Expand]Zaposleni
     Koledar
    [Expand]Računovodstvo
    [Expand]Carina
    [Expand]Dokumentacija
    [Collapse]Program
     [Expand]Vrste dokumentov
     [Collapse]Izpisi v PANTHEON-u
       Delovno okolje
       Izvozi ime datoteke
       Poročila Register
       Posebnosti izpisov
       Nastavitve
       Predogled tiskanja
       Zgradba izpisa
       Objekti
      [Expand]Oblikovalec poročil
       Izrazi
      [Collapse]Ustvarjanje poročil
        Poročilo o predmetih
        "Pozdravljen, svet!"
        "Besedilo" Objekt
        Skupine
        "Seznam predmetov" poročilo:
        "Slika" Objekt
        Raztegovanje predmetov, prelomi strani in premikanje predmetov
        Prikazovanje podatkov v obliki tabele
        tiskanje etiket
        Otroške skupine
        Poročilo z dvema nivojema podatkov (glavni-podrobnosti)
        Glave in Noge podatkovne pasice
        Večstranski poročilo
      [Expand]Skupine in agregati
       Grupiranje in številčenje
      [Expand]Funkcije
      [Expand]Oblikovanje in označevanje
       Sistemske spremenljivke
       Vgrajena poročila (podporočila)
       Uvoz in izvoz
      [Expand]Skripta
       Tabele in poizvedbe
       Prenos izpisa v druge baze
       Izvoz oblike izpisa
       Uvoz oblike izpisa
       Bližnjica na izpis
       Podvajanje izpisov in spreminjanje tipa izpisa
      [Expand]Uporaba izraza SQLEXP v izpisih
      [Expand]Sporočila pri oblikovanju izpisov
      [Expand]Oblikovanje izpisov
     [Expand]Teksti za dokumente
      Načini dostave
     [Expand]Kartice zaupanja
     [Expand]Administratorska konzola
     [Expand]Gradniki nadzorne plošče
      Poročila nadzorne plošče
      Poročila nadzorne plošče
      Ad-hoc analize
     [Expand]ARES
      SQL urejevalnik
    [Expand]Zamenjaj uporabnika Ctrl - U
   [Expand]Naročila
   [Expand]Proizvodnja
   [Expand]Blago
   [Expand]Servis
   [Expand]Denar
   [Expand]Kadri
   [Expand]Namizje
   [Expand]Analitika
   [Expand]Sporočila programa
   [Expand]Uradna pojasnila
   [Expand]Sistemsko okolje
   [Expand]Dodatni programi
    Slovar izrazov
   [Expand]Zastareli produkti
  [Expand]Vodič po PANTHEON Farming
  [Expand]Vodič po PANTHEON Retail
  [Expand]Vodič po PANTHEON Vet
 [Expand]Uporabniški priročniki za PANTHEON
[Expand]PANTHEON Web
[Expand]PANTHEON Granule
[Expand]Uporabniške strani

Load Time: 828,1684 ms
print   |
Label

Poročilo z dvema nivojema podatkov (Master-Detail)

Poročilo z dvema nivojema podatkov (Master-Detail)

Do sedaj so naši primeri poročil uporabljali le en podatkovni pas (“Podatki prve ravni” ali ”MasterData”) za nadzor izhoda podatkov. To je bilo zadostno za izhod podatkov iz ene baze podatkov. Pantheon omogoča tudi oblikovanje poročil z do šestimi nivoji podatkov, vse na eni oblikovni strani. Poleg tega je mogoče doseči neomejeno število nivojev podatkov v poročilih z uporabo objekta “Subreport” - ta objekt bo obravnavan kasneje. Večina poročil na splošno potrebuje le en, dva ali tri nivoje podatkov, večje število nivojev podatkov je redko.

Poglejmo, kako oblikovati poročilo z dvema nivojema podatkov. Poročilo bo izhodilo podatke iz tabel: “tHE_SetSubj” in “tHE_Order”. Prva tabela je seznam predmetov in druga je seznam naročil, ki jih oddajo ti predmeti (stranke).

Druga tabela vsebuje seznam vseh naročil, ki jih oddajo vse stranke. Da bi si ogledali naročila iz tHE_Order table which are placed by one customer in the Customers table, the two tables are linked on the “acSubject” field from customers and "acConsignee" field from order table.

Let's design the report. Create a new report and place two “TfrxDlDBTable” components on the form. Set the component properties as shown here:

Table1:

TableName = 'tHE_SetSubj'

UserName = 'Subjects'

Table2:

TableName = 'tHE_Order'

UserName = 'Orders'

Now add a “MasterData” and a “DetailData” band to the page:

Note that the “MasterData” band must be placed above the “DetailData” band! Drag it there if necessary. If the Master is placed under the Detail, Pantheon will generate an error message when you preview the report.

If you previewed the report now, you would see that the list of orders remains the same for every customer and contains all the records from the “Orders” table. In code on the report add two lines as you can also see on the picture

Now we have set a 'Master-Detail' relationship and link between fields in two sources.

When creating the preview FastReport does the following. After a record is output from the master table (Customer), it sets the filter on the detail table (Orders). Only those records which meet the 'Orders.acConsignee = Subjects.acSubject' condition will remain in the table. This means that for each customer only those orders which belong to the current customer will be displayed in the detail band. This is an important concept to grasp. Even though data bands may be of master or of detail type, they only control the positioning of the data on the output page (order and number of times displayed). The data displayed by the objects in the bands is dependent on which fields the objects are linked to and on the external linking of the two tables.

This is the final output:

Reports can containing up to 6 data levels can be constructed in a similar manner.

In a lot of cases Master-Detail relationship is in set up in the program code.

Let's look an example of the report '3C0 - Travel Management Report'  that is in the program menu 'Personnel | Travel Management | Reports' .

On the report master table is 'main' table of travel orders, detail table is the table with positions of travel order. In this case we have also one more level (subdetail table) namely costs on the position of travel order.

On this report we have also two bands with "RowCount" property set to value 1 and subreports which we will meet later.



Ali so bila ta navodila uporabna?
Vaše povratne informacije bodo prispevale k boljši pomoči.
Komentarji
Komentarji so izpostavljeni tudi na forumu.