Report Writer

Hi folks,

Someone has wrote the following report writer available at:

http://www.daily.de/RepWrt/

Questions:

(1) Is it possible for this to work under wxPython?
(2) If above is true. How difficult to do this?

Regards

Richard

First you should compile it, and them create a python handler.
If you know C++ it's not a hard job,but have some troubles,based on their implementation,to use this you have to recompile wxWidgets for C++(they use the gtk version).
  It would be nice to have a tool like this in wxPython,i use wx-X11 for C++ so i can't use it (my computer does not have memory enough to compile the wxGTK) since the wxPython only use the gtk version.But would thank a lot a good spirit that
make it disponible to wxPython.

···

On Sat, 13 Mar 2004 21:50:23 +0000 Richard Grosse <lists@keep-trying.com> wrote:

Hi folks,

Someone has wrote the following report writer available at:

http://www.daily.de/RepWrt/

Questions:

(1) Is it possible for this to work under wxPython?
(2) If above is true. How difficult to do this?

--
Rodrigo

I compiled it!!!!
  I had to change some things on source(add a include) and made a Makefile for it, compiled it to a object and then compiled and tested the demo program.It worked(not very well , some images disaperead, but i think it's a path problem,since i made a lot off,as we say here, gambiarras.
  I have none experience off writing python libs, and still does not understand how to write a report(there must exist a program for that no?),but i'm a volunteer to incorporating it on wxPython.

···

On Sat, 13 Mar 2004 23:30:26 -0300 Rodrigo <hso.suporte@ig.com.br> wrote:

  First you should compile it, and them create a python handler.
If you know C++ it's not a hard job,but have some troubles,based on their implementation,to use this you have to recompile wxWidgets for C++(they use the gtk version).
  It would be nice to have a tool like this in wxPython,i use wx-X11 for C++ so i can't use it (my computer does not have memory enough to compile the wxGTK) since the wxPython only use the gtk version.But would thank a lot a good spirit that
make it disponible to wxPython.

--

Rodrigo wrote:

First you should compile it, and them create a python handler.
If you know C++ it's not a hard job,but have some troubles,based on their implementation,to use this you have to recompile wxWidgets for C++(they use the gtk version).
It would be nice to have a tool like this in wxPython,i use wx-X11 for C++ so i can't use it (my computer does not have memory enough to compile the wxGTK) since the wxPython only use the gtk version.But would thank a lot a good spirit that make it disponible to wxPython.
   

I compiled it!!!!
I had to change some things on source(add a include) and made a Makefile for it, compiled it to a object and then compiled and tested the demo program.It worked(not very well , some images disaperead, but i think it's a path problem,since i made a lot off,as we say here, gambiarras.
I have none experience off writing python libs, and still does not understand how to write a report(there must exist a program for that no?),but i'm a volunteer to incorporating it on wxPython

Basically, what does this piece of software do ?

I know it is a report writer but I'd like to know how they are written. With a visual GUI or from an editor ?

Which data format does it take as an input ? What kind of reports are generated ? html, pdf, other ?

And... I there already something that works with wxPython to create report ? If not, this tool would be a definitive plus for us !

···

On Sat, 13 Mar 2004 23:30:26 -0300 >Rodrigo <hso.suporte@ig.com.br> wrote:

Greetings,

Well all I can say is that I am impressed.I do not even understand
the compiling instructions! Did you test it under wxpython or
only under wxwindows C++.

Below is an example of report construction
from the author himself. I do not know if this
helps or not as it for wxwindows not wxpython.
The data is fed from a database source though I can
see no reason why you could not read a cvs file containing
data, assuming you formatted correctly.

Regards

Richard

====>

wxReportObj *pObj;
wxReportWriter *pReport;
wxFont fntBig( 14, wxDECORATIVE, wxITALIC, wxBOLD, true );
wxFont fntSmall( 6, wxSWISS, wxNORMAL, wxNORMAL );

pReport = new wxReportWriter( this, "My Report",
                 wxPoint(10,10), wxSize( 100, 100 ) );

// -----------------------
// HEADER
// -----------------------
pObj = new wxReportObj( 0, 0, 100, 30 );
pObj->SetBitmap( wxT("company-logo.png") );
pReport->AddHeaderObj( pObj );

pObj = new wxReportObj( 60, 7, 200, 20 );
pObj->SetData( wxT("Database Report") );
pObj->SetFont( &fntBig );
pReport->AddHeaderObj( pObj );

// -----------------------
// FOOTER
// -----------------------
pObj = new wxReportObj( 0, 12, 170, 0 );
pObj->SetLine();
pReport->AddFooterObj( pObj );

pObj = new wxReportObj( 120, 8, 30, 20 );
pObj->SetPgNum( wxT("Page") );
pObj->SetFont( &fntSmall );
pObj->SetRightAlign();
pReport->AddFooterObj( pObj );

// -----------------------
// MISC
// -----------------------
pReport->SetDate( wxDateTime::Now() );
pReport->SetUser( "Juergen" );
pReport->SetInfo( "My third report" );

// -----------------------
// MAIN REPORT DATA
// -----------------------
pReport->DefineSection();

pObj = new wxReportObj( 0, 25, 15, 8 );
pObj->SetRef( &MyDb.m_name );
pObj->SetIncrements( 0.0, 4.23 );
pObj->SetFont( wxITALIC_FONT );
pReport->AddDataObj( pObj );

pObj = new wxReportObj( 16, 25, 25, 8 );
pObj->SetRef( &MyDb.m_zipcode );
pObj->SetIncrements( 0.0, 4.23 );
pObj->SetFont( wxNORMAL_FONT );
pObj->SetRightAlign();
pReport->AddDataObj( pObj );

::
:: etc.
::

// Now feed data into the report...

pReport->BeginDataSection();

// This may produce some hundred pages of report
if ( MyDb.Query() )
     while ( MyDb.GetNext() )
         pReport->SaveData();

pReport->FinishSection();

pReport->FinishReport();

delete pReport; // deallocates all report's memory

···

At 03:27 14/03/2004, you wrote:

On Sat, 13 Mar 2004 23:30:26 -0300 >Rodrigo <hso.suporte@ig.com.br> wrote:

> First you should compile it, and them create a python handler.
> If you know C++ it's not a hard job,but have some troubles,based on their implementation,to use this you have to recompile wxWidgets for C++(they use the gtk version).
> It would be nice to have a tool like this in wxPython,i use wx-X11 for C++ so i can't use it (my computer does not have memory enough to compile the wxGTK) since the wxPython only use the gtk version.But would thank a lot a good spirit that
> make it disponible to wxPython.
        I compiled it!!!!
        I had to change some things on source(add a include) and made a Makefile for it, compiled it to a object and then compiled and tested the demo program.It worked(not very well , some images disaperead, but i think it's a path problem,since i made a lot off,as we say here, gambiarras.
        I have none experience off writing python libs, and still does not understand how to write a report(there must exist a program for that no?),but i'm a volunteer to incorporating it on wxPython.

Hi folks,

Rodrigo wrote:

Basically, what does this piece of software do ?

I know it is a report writer but I'd like to know how they are written.
With a visual GUI or from an editor ?

There is no visual GUI, reports have to be scripted. However from the
couple of samples shown on the web (in goggle groups), it appears
to a much simpler(!) way of building reports over the alternatives.Such
as reportlabs PDF tools, which are very good but complicated and the
wxprinting classes which seemed to be flawed. See my other post
for an example. From what I can see this report writer is an
improvement on the wxprinting.

Which data format does it take as an input ? What kind of reports are generated ? html, pdf, other ?

Data Input. Again (as I have not used it) as far as I can see, any type
of input can be used. If you can access it in python then you can
use it in your report.

The only report style generated is what is outputted by the class.
Though I would have thought it possible to take the output and
reformat it. I.E. if you printed it to a pdf printer on the windows platform
you can get a pdf output.

And... I there already something that works with wxPython to create report ? If not, this tool would be a definitive plus for us !

There is a printing framework within wxpython. However I have found it difficult
to use and when I have got it to work, I found things like the print preview
not scaling correctly. To me this report writer looks like just what I am looking for.
Though until I try it out I cannot comment any more.

Best Regards

Richard

···

At 08:33 14/03/2004, you wrote:

On Sat, 13 Mar 2004 23:30:26 -0300 >>Rodrigo <hso.suporte@ig.com.br> wrote:

Hi Richard,

Richard Grosse wrote:

Hi folks,

Someone has wrote the following report writer available at:

http://www.daily.de/RepWrt/

Questions:

(1) Is it possible for this to work under wxPython?
(2) If above is true. How difficult to do this?

I'am not able to help you with the above mentioned software but have you tested Reportmanager http://reportman.sourceforge.net/?

Andreas

Hi,

Strange enough I have just been looking at this:-)
Certainly appears to be very good.
(a) GUI Designer
(b) PDF output if needed
(c) Works across different platforms
(d) Interfaces to a variety of databases include Postgresql

Having a few difficulties with it. However author is
quick to respond to queries and has reasonable
support charges.

The main disadvantage to it is being a further dependance
so I would prefer a "wxpython" solution ideally however
until a new wxpython binary becomes available (see other
emails) . This certainly looks to be the best solution.

Regards

Richard

···

At 13:20 14/03/2004, you wrote:

Hi Richard,

Richard Grosse wrote:

Hi folks,
Someone has wrote the following report writer available at:
http://www.daily.de/RepWrt/
Questions:
(1) Is it possible for this to work under wxPython?
(2) If above is true. How difficult to do this?

I'am not able to help you with the above mentioned software but have you tested Reportmanager http://reportman.sourceforge.net/?

Andreas

Richard Grosse wrote:

Hi folks,

Someone has wrote the following report writer available at:

http://www.daily.de/RepWrt/

Questions:

(1) Is it possible for this to work under wxPython?
(2) If above is true. How difficult to do this?

Regards

Richard

The TablePrint features already in wxPython are very easy to use, and are flexible enough to handle a wide range of simple reporting needs.

Print preview is built in, and as the data is (I know this should be "are", but it's never sounded right to me) stored in a standard Python list of tuples, it can easily be pickled/shelved to either a spooled reports database or just single files in a specified directory, which is what wxRepWrt seems to be doing.

I would expect adding spooling and reprinting features to be easier than patching a brand new framework into wxPython.

Whilst I've no immediate need for it myself, I'll look at putting something together over the coming weekend if anyone is interested.

Regards,

Chris Wilson
Cleator Wilson Limited