RE: Flat file map with detail and header

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Funny, that there is always system doing things "backwards"...

I have never come across this scenario, but I think I would have written a
receive pipeline that reorganized the document structure (to a header first
structure).

Kind Regards
Martin Bring

"Kvitepus" wrote:

I want to map a flat file to a structured xml file.
My problem is that the flat file contains detailrecords and then a
headerrecord
connected to the detailrecords. Like this:

<InvoiceDetail No="1">123</InvoiceDetail>
<InvoiceDetail No="1">345</InvoiceDetail>
<InvoiceDetail No="1">456</InvoiceDetail>
<InvoiceHeader No="1">999</InvoiceHeader>
<InvoiceDetail No="2">222</InvoiceDetail>
<InvoiceDetail No="2">33</InvoiceDetail>
<InvoiceDetail No="2">44</InvoiceDetail>
<InvoiceHeader No="2">88</InvoiceHeader>

The "No"-field connects details and header records.

The structured destination file have the header area first
and then details area. Like this:

<Invoice>
<InvoiceHeader No="1">999</InvoiceHeader>
<Details>
<InvoiceDetail No="1">123</InvoiceDetail>
<InvoiceDetail No="1">345</InvoiceDetail>
<InvoiceDetail No="1">456</InvoiceDetail>
</Details>
</Invoice>

<Invoice>
<InvoiceHeader No="2">222</InvoiceHeader>
<Details>
<InvoiceDetail No="2">23</InvoiceDetail>
<InvoiceDetail No="2">44</InvoiceDetail>
<InvoiceDetail No="2">88</InvoiceDetail>
</Details>
</Invoice>

How can i make this structure in the map ?
Now I get as many InvoiceHeaders as there are InvoiceLines.

Thanks in advance.
Kvitepus
.



Relevant Pages

  • Re: Bound controls in Page Header section of Access 97 report
    ... Suppose we want to have a page header ... that lists the invoice number for the page as well as the product name. ... control with the product name in the page header. ... it simply select the first record in the set of records on that page to ...
    (microsoft.public.access.reports)
  • Re: How do I add a sum of a subform on a parent form?
    ... > Kanga, don't store this total in the main form's table. ... >> The user can go in the form header and then open the subform with the line ... >> line amounts of the invoice line form, that upon closing the subform the ... >> invoice amount on the header is recalculated. ...
    (microsoft.public.access.queries)
  • Re: Problem with naming group headers.
    ... The simplest approach would be to create one invoice for each order. ... Invoice header ... Order footer ... To remove the Report Header and Footer, click the item on the View menu. ...
    (microsoft.public.access.reports)
  • Re: SPEED QUESTION
    ... header search and detail presentation. ... Supply criteria to the user to search through all those invoice headers, ... have another section of your form load the invoice details ... >> Dacon Software Consulting ...
    (microsoft.public.dotnet.languages.vb)
  • Re: BeginTrans
    ... Here is my techinique / philosophy which is ... First, when building an invoice, since I use tADODatasets, clientside ... ado recordset) that is "new". ... Method 1 requires that you have the header completely ready to commit to the ...
    (borland.public.delphi.database.ado)