eText Template For Multiple Line Output

Uwinator

Member
Hi there,

I got a problem regarding text output by the BI Publisher.

The szenario: I have a general purpose output to XML which contains multiple data rows of the same structure. After that I need a configurable subset of the fields in the data source which are to be exported to a CSV file. The configuration is needed to be done without any need of further programming, therefore I wanted to use the eText template of a DELIMITER_BASED type.

My problem is that there are multiple nodes/rows in the XML data source which have to be exported to the CSV file. The access to the elements is defined in XPATH syntax. Furthermore the documentation of the NEW-RECORD-command says, that it produces a single line of output.
That implies, that I would have to define the same table for each row and that's ridiculous not only because I cannot know the row count in advance.
I have no idea whether the for each condition is working in this case and if so, where to put it in my template definition. All attempts have failed so far. But isn't exporting multipe lines of data of the same structure a common use case for EDI?

Do you know whether I can accomplish my goal with the eText template or am I pursuing the wrong path here?


Best regards and thanks in advance,

Uwinator
 

Uwinator

Member
I found my mistake and thus the solution to my problem. It was the specification of the level command in the eText template. There is an XML structure like

<EXPORTS>
<ROW>
...
</ROW>
<ROW>
...
</ROW>
</EXPORTS>

My level command was specified like EXPORTS and my data specification like ROW/tagname. As described above, this resulted in one single line of output.
If I switch the level to EXPORTS/ROW and adjust the data specs accordingly, I get the desired output.
 
Top