Home Datapipelines

Report based on xml-data

Hi,

within a project any data is stored as xml-data. This may be files or strings in a database.
I now have to print this data.

Our normal way is to create tables within a database, which works for decades very fine.

I see different approaches to solve my problem:

1.) Use old way, create tables and ....
Unfortunately the structure of the xml-data is something between "fits into a single table" upto "ERD does not fit onto a single page using fontsize=2".
Maintaining this tables will be a horror

2.) Use textfiles by TextPipeline
Use any magic way to create multiple CSV-Text-files which can be used by a textpipeline

3.) JITPipiline on objects
Any of these XML-File is available as a object-structure. There could be multiple JITPipelines to walk through the objects.


Any ideas or best practices how to solve my issue?

Tia Carsten


Comments

  • Hi Carsten,

    One solution is to use Delphi's XMLMapper to create an XML transformation file. Then connect a ClientDataSet to an XMLTransformProvider component that uses the Xml transformation file to map the XML data to the ClientDataSet.

    https://stackoverflow.com/questions/31455000/parsing-xml-file-delphi

    Then connect the Report DBPPipeline to the ClientDataSet.



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • Hi Nard,

    thanks a lot for your fast response. I had a look on your solution, but in XE it does not work as XMLMapper-Util is missing.

    But i might inspire me to try an other solution

    Cheers
    Carsten
  • Hi Carsten,

    i looked over the latest Delphi feature matrix, the XML to/from DataSet features require Delphi Enterprise.

    I found another Stack Overflow example that uses XML Parser to parse the XML, define ClientDataSet fields, and load the field values.

    https://stackoverflow.com/questions/35412477/load-dynamic-xml-into-dataset



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
Sign In or Register to comment.