Load openRPT synamically?

Developers
J. Preiss
2007-04-22
2013-04-26
  • J. Preiss
    J. Preiss
    2007-04-22

    Hi,
    sorry, I just started to have a look of openRPT...
    would it be possible to load the viewer of the reports as a .so/.dll?
    My programs run with Qt4, too, so it would be nice to design any list layout as a report, which can be viewed and printed by a reporting tool.

     
    • Hi,
      I chose to discard the OpenRPT renderer becose we dont have qt support neither a direct link to the postgres (we access db through a xmlrpc service).
      So I dont have explored the OpenRPT renderer features, I'm sorry.
      However there's not so hard to parse the xml template. If you project use python, you can take a look of pdflayer.py in pypapi project.

      bye
      tiziano

       
    • J. Preiss
      J. Preiss
      2007-04-23

      Well, for me it would fit perfectly. Qt can map db access to odbc or mysql, layouts are in xml format (I hope they are stored as utf8)... I'll have a look at the sources I think.
      Maybe the renderer could be implemented as a plugin?

       
      • It's a idea.
        For now it's possible to use my pdf_layer with this code:

        d = {mykey:myvalue,}  # parameter's dictionary
        template = 'mytemplate.xml'
        pdffile = 'outfile.pdf'
        pdf = pdfwriter(template, pdffile, d)

        So I think it cuold be easy to implement some other mechanism (command row?)...

        ciao
        tiziano

         
    • Chris Ryan
      Chris Ryan
      2007-04-23

      Both the renderer portion and the writer portion of the OpenRPT project are written as libraries so that they may be embedded in other projects as required. We have them as statiscally linked libraries but it should not be difficult at all for you to modify the config to generate shared object libraries or to wrap the libraries in your own shared library.

      If you look at the renderapp and writer projects you will see how the two components libraries are implemented. The Writer portion is a little more invovled but the renderer is as easy as instantiating an object, setting the report definition xml, passing in some parameters and generating the output.

      Chris Ryan

       
    • J. Preiss
      J. Preiss
      2007-04-24

      Ok, then it'll no problem I think. Cool. Why not make it always dynamical? config += dll?

       
    • Chris Ryan
      Chris Ryan
      2007-04-25

      If I recall correctly we originally were using the code as a dynamic library. At some point though we decided it better suited our needs to use it as a statically linked library. As such the base code in CVS is configured that way. In either direction it is a preference choice that you can change if your needs are different.

      Chris Ryan