[Kexi] Using Kexi databases/queries in KWord (or other KOffice apps)

Matija Šuklje matija.suklje at rutka.net
Fri Jul 28 23:47:50 CEST 2006


Dne petek 28 julij 2006 17:15 je Sebastian Sauer napisal(a):
> Ups. Sorry, I read your mail after sending the other one :)

No problem ....I'm replying here as well.

> first a lot of thanks for the feedback. I may like to add, that we don't
> ignored it, but just totaly agree with most of what you wrote. So, let's go
> into details;

Terribly sorry, didn't mean to make it sound like that - I merely though that 
both lists could find interest in the issue.

> That may possible with KWord's mail-merge. You are able to e.g. store the
> KexiDB at a MySQL database and then use KWord's mail-merge to merge those
> data into your document using QtSQL to access the MySQL database.
> Another way may to use dcop (dbus with kde4/Koffice 2.0) from within a Kexi
> script to control KWord or/and KSpread. So, it should be possible to
> iterate e.g. with a simple Python or Ruby script through the database,
> format the data and then insert the data e.g. at KSpread. KSpread from the
> 1.6-branch (according to the releaseplan 1.6 alpha1 will be published next
> days/weeks) does contain the ScriptEditor which has some example
> python-scripts that demonstrate how to import data from a KexiDB into a
> KSpread document or how to access KWord with dcop). But while it's
> possible, I would not see it as optimal or as nice solution. It's just a
> "it works that way, but will maybe change in future releases since it's not
> the best solution" thing :-)

hmmm ...sounds like A LOT of coding that sadly I just don't have time to learn 
right now. I knew I should have studied Python when I still had time this 
year!

> I guess it really sounds like a very common solution. So, if you are
> interessted, I could try to provide some help to get this task done. My
> main interesst here would be, to have at the end a nice working template
> for KSpread ( http://www.kde-files.org/index.php?xcontentmode=611 ), so
> that other users don't need to reinvent the wheel.

Of course when I'll do it properly I'll post it there - I've been thinking of 
some content to put up there anyway (like Tea collection for Tellico). It'll 
just have to wait for a while.

> I Would really recommed to use KSpread without Kexi for that task. From my
> point of view it looks as that may the better, easier and even more lighter
> solution. But since I don't try to convince here and since you are the one
> who knows best what your needings are, I could at least try to help you to
> get some steps forward :)

I've though about it a bit ...and I still think that the ideal solution should 
be to just enter stuff with Kexi into a DB and then have/make a template in 
KWord with some spreadsheets in that would do the queries "by itself".

But since I have a massive amount of studying to do right now and still want 
to do it "properly" at some point, I'll probably do a two-fold solution: 
continue to update the database for further development while at the same 
time do it temporarily in KSpread, because it seems faster.

> Those both are simple SQL select-statements. But since they depend strong
> on how you designed your tables...

That's another problem that I see in Kexi (I know it's an early version) ...I 
imagine that Kexi is supposed to be suitable also for users who don't know 
SQL commands by heart. Therefore I think it would be very helpful if at some 
time there would be a suggestion/completion tool in Kexi like it is for 
example in KDevelop - it would suggest and/or complete commands (with help?) 
according to the database backend that is currently in use. Such a feature 
would most probably benefit Kexi very much ...but I imagine it's a lot of 
work to put in.

> dcop with Kross or mail-merge as outlined above...

mhm ...Kross is not implemented yet AFAIK, but seems to be the optimal 
solution in the long shot. For now I think I'll just have to do with a 
temporary solution, until the exam season ends.

> hehe... yes, for your special case it really seems simpler. Not only to
> design, but also to maintain and work with.

As I said - I'll make it in KSpread now (probably even manually copy-paste for 
now), but still keep the option open to use Kexi with it.

> And that's where I agree absolutly. So, to sum it up; the integration
> between the apps could be improved much more to allow such workflows (or
> other workflows where no way around using a database does exist). It sounds
> as you should really try to create a wishreport for this at
> http://bugs.kde.org to be sure that wish doesn't got lost on the one hand
> and to allow others to agree with your wish too and to vote for the wish or
> even extend it with there own usage-scenarios.

Think so? A wish report for an integration for Kexi commands with other 
KOffice apps or the specific scenario?

> Just as extension re the topic of more integration of Kexi with the other
> KOffice-applications you may also like to take a look at
> * http://www.kexi-project.org/wiki/wikiview/index.php?KOfficeIntegration
> * http://kde.ground.cz/tiki-index.php?page=koffice2roadmap#id242570

Will do :]

> So, you are really not the first one who complained about that and we take
> it very seriously and plan to just do it. But such detailed
> usage-scenarious as you wrote here are useful anyway. So, thank you a lot!

Meh, no problem - it seemed a normal thing to do :P

> Yes, we arn't around fulltime and as you may see with this mail, it cost
> some time to write a nice answer to such a nice question :-)

heh ...sorry again ...it's just that I'm used to quick answers on lists (in 
Cyberpipe we have a project/org list where you're expect to reply in a matter 
of minutes - it takes up more space in my mailbox then all the other boxes 
put together - including the inbox, kde-i18n and reports from diverse 
bugzillas) I'm not trying to assault you, I'm merely trying to explain 
myself :]


regards,

Matija
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kexi/attachments/20060728/7faf9a7f/attachment.sig 


More information about the Kexi mailing list