Hi.
It is R42565?
The first time I implemented in Formscape I had a lot of work inserting tags (statics texts) to exactly delimit R42565 sections (two by section BEGIN_SECTIONNAME and END_SECTIONNAME) and use page splitters to caths all stuff
Now I use the very same technique for all my repports, JDE outputs a PDF containing XML, and formscape read the xml directly to a container and you forget about input processing. Here is a short explanation:
1. Make a little schema about the needed xml format, ie for the invoice this could be: (dont detail all the close tags in this example)
<R42565>
<Parameters>
<Environment> PD7333 </Environment>
<PrintDate><![CDATA[ 01/01/2009 ]></PrintDate>
<ProcessMode>< Proof > </ProcessMode>
</Parameters>
<Invoices>
<Invoice>
<Company>
<DocumentType>
<DocumentNumber>
<InvoiceDate>
<SoldTo>
.......
.......
<Address>
<Line1>
<Line2>
</Address>
<Lines>
<Line>
<OrderNumber>
<LineNumber>
<Item Number>
............
</Line>
</Lines>
</Invoice>
</Invoices>
</R42565>
1. Implement a process option to enable Formscape output alias YN
2. In order of this formscape option set to Y suppress output of all reports sections and enable output of your xml output
3. Create a new section called XML with a global GPTX called XML_GPTX limited to 180 chars
4. Implement the output for like
4.1. In the Report Header
XML_GPTX = <R42565>
Do Custom Section(RS_XML)
XML_GPTX = <Invoices>
Do Custom Section(RS_XML)
4.2. In the section that you want the output repeat the same technique, ie:
XML_GPTX = <DocumentNumber>
XML_GPTX = concat(XML_GPTX, BC Document Number)
XML_GPTX = concat(XML_GPTX, "</DocumentNumber>")
Do Custom Section(RS_XML)
I always emit one tag with his data and close tag by line to make it easier to read and debug
then you have the following benefits:
1. You don't have to change the positions of any field in the standard report to be able to process it in formscape
2. Your customizations are always with the same method independent of the report (and be in the same way that your custom development)
3. You can easily add new data without affecting the the structure of the JDE report, nor the input processing of the Formscape part
4. In formscape your input processing is done in exactly 2 lines of code and you have all your data in a container, ready for output. (forget about overlaping fields, changing tags because of language changes, forget about mappings each field to pagebanks, check data lengths and formats, etc), ie of input
4.1 Create a container variable (a Bag)
4.2 parse the input to a pagebank (pdf to pagebank parset)
4.3 with a pagebank cutter copy the input pageban to a continuous one (with 999999999 in the lines per page)
4.4. use a copy unicode text (input a pagebank text form the continuous pagebank), output to a XML parser to the container variable
4.5 you are done
The first time you use this technique i could give you some extra work to get the point of making the ideal xml structure for your report, but when you have done 2 or 3, you will notice a speed and work hours improvement against the traditional pagebank mapping
Hope this helps