Re: [gnome-db] Papyrus, xml reporting



On Wed, 2001-12-26 at 03:29, Andrew Hill wrote:
> > 
> > > gnome-print is used a lot for the actual printing, previewing etc.
> > > though we ran into a few minor short comings with it which wont take
> > > long to modify gnome-print to resolve these (like not been able to run
> > > reports non-interactively).
> > >
> > hm,, gnome-print should not be used (at least libgnomeprintui,
> > libgnomeprint would be ok) in the report engine, since this will make it
> > depend on GTK, which is not good.
> > The preview stuff should belong to the UI parts of the architecture
> > (libgnomedb)
> 
> libgnomeprint still depends on all the gnome stuff.  I know its bad been
> tied to UI libary like gnome-print but we looked at 4 different libaries
> and gnome-print was the most commonly installed feature rich one of them
> all and didn't have any annoying little bugs that screwed up stuff in
> the first prototype.  you could take the render_print.c and print.c into
> a different libary, though there are parts of the xml parser that
> currently use gnome, in regard to fonts etc.
> 
I was talking about GNOME 2's libgnomeprint, which is separated into
libgnomeprint and libgnomeprintui. The first one does not link with GTK
at all, so that one is ok to be used in the gda-report part (libgda does
not use GTK at all). I was saying that all libgnomeprintui use should be
moved to libgnomedb, where GTK is already used.

> > > postitioning is both relative and absolete.  relative been the first
> > > choice.  data is managed in groups, and groups can be sub sets of
> > > groups.  Report generation isn't single parse and the whole thing is
> > > generated in a 2d workspace before been dumped to gnome-print. This
> > > makes it resource hungry but it also gives us the best felixablity.
> > >
> > my idea, on the report engine part, is to just return the XML filled in
> > with data from the different data sources. Then, the rendering
> > (conversion to gnome-print for previewing and printing) should be done
> > on the client side, so I think it is not a big problem if it is resource
> > hungry, as this will be done on the client side.
> 
> arr ok now we differ.  I was using the XML to define the report, similar
> to how you would use HTML to define a web page. And then report server
> would read the xml and generate a report (ie a pdf file).  though the
> report system could only be client side effecivly.  The xml was not
> going to have invidiual row data in it but this would be handled in
> memory with structures.  though this is one differing approach to xml.
> i'll ask andre about it.  
>   
yes, we could just modify the runDocument method to be:

Bonobo::Stream runDocument (
	in Bonobo::Stream xml,
	in string mime_type);

and have the engine itself make the conversion if the client asked so.

>  
> > * XML format: I don't really care about the XML format we're going to
> > use as long as it fits all our needs. So please, Carlos and Andrew, just
> > get along on the format you both want.
> > 
> > * datasource independence: as I said, I can easily add a CORBA interface
> > for adding new datasources to the report engine, and a C wrapper for it
> > in libgda-report. This, as said before, will work by using a prefix
> > (gda:, xml:, etc) in the command to be executed. I'd prefer to use CORBA
> > interfaces for this rather than normal plugins (.so), since it makes
> > more sense to use the glue used everywhere in libgda.
> 
> just put the corba interfaces in the binding libary, there is no
> bindings for corba i know of for talking directly with postgresql.  This
> is just to give more flexibility for porting (orbit doesn't currently
> work under win32), and future proofing. and hey the works already done. 
> plus i need this reporting system to talk to some oldschool databases of
> mine which dont have corba bindings.
>  
there's no need for CORBA bindings for each datasource. We will provide
them. That is, I've coded a GdaReportDatasource class, which implements
the Datasource interface I talk about. And, to add a new datasource,
you'll just have to:

ds = gda_report_datasource_new (GdaReportDatasourceGetFunc func);

in get_func, you'll just get a command string, and you'll have to return
a GdaServerRecodrset, which you create with gda_server_recordset_new.

That is, what we would do for adding datasources is just create new
GdaReportDatasource objects.

If you want to port to win32, for instance, you just have to modify the
CORBA bits, but you can keep the same API than on UNIX/Linux

> > * UI: this is the part that would use the preview stuff from
> > libgnomeprintui. Also, we need a designer, which is on what Jim will be
> > working on. This should be in libgnomedb
> 
> At the moment payprus covers both the UI and the low level stuff.  I can
> make sure they stay reasonbly seperate.  but as i said before the
> wouldbe outputed xml file is stored in memorory at the moemnt in data
> structures. the phases it goes though in report generation are as
> follows:
> 
> parse xml, generate strcutres reprensenting it.  connect to db's etc.
> generate a layout, defining hwo the objecst correspond to each other
> get the data, create a render object.
> <- here a step could be added to generate an xml file from the render.
> (this would be taking the render_item structure present and creating an
> xml file from it, and then a function to re-generate the structure
> again)
> render_print lays the stuff out in 2d space.
> print sends the stuff to libgnomeprint
> 
ok, sounds nice. I'll continue looking at it today, and see how all this
can be mixed keeping all people happy :-)

cheers
-- 
Rodrigo Moya <rodrigo gnome-db org> - <rodrigo ximian com>
http://www.gnome-db.org/ - http://www.ximian.com/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]