Page 1 of 2

How to create report with "Notes" info?

PostPosted:Wed Nov 07, 2012 10:09 am
by TonyW
Using : OpenKM 6.2 Community Edition.

I want to make it possible to print a report that for a single published document gives the info that is added under the tab "Notes".
It should contain the info as displayed: name, date and the note itself.
It would even be better if I could print the content of the corresponding document and have the "notes" printed immediately behind and not have the notes on a separate page(s).
I'm sure that it should be possible, but I'm new to OpenKM and Jasperreport, so I don't know where to start. Is there anybody who has this and is willing to share the corresponding script or give me a starting point?

Re: How to create report with "Notes" info?

PostPosted:Thu Nov 08, 2012 10:01 pm
by jllort
We need some aclaration, you want report of new documents ( created or updated ) and then if they have notes include in report or really you're looking for report for new notes added and include in report document path etc... Is not the same looking for document and get extra information than looking for notes and get extra information about notes.

After it I will be able to suggest how starting, and some real example for get as basis. Other question to finish do you have some java skills ?

Re: How to create report with "Notes" info?

PostPosted:Sat Nov 10, 2012 2:18 pm
by TonyW
I try to explain better:
- person A adds a document to OpenKM.
- person B and C (and maybe A) adds a Note via the standard user-interface ("Notes" tab)
- when all Notes are added, I want a person to print out the content of all these notes (including who added the note and when).

When possible I want the content of the document first, and then at the bottom or next pages the content of all the notes. (If only the content of the notes is possible, that is also OK).

my Java-skills are limited (but I hope to improve them), but I have programming skills with Visual Basic, so I can read programming-code.

Many thanks in advance for all the offered help.

Re: How to create report with "Notes" info?

PostPosted:Sun Nov 11, 2012 4:18 pm
by jllort
That's not trivial feature. Which kind of document do you want to generate ( pdf ? or other kind ). You want downloading a file which adds at the end the saved notes no ?

The easiest way is always downlading pdf file. The idea will be export original document to pdf and merge at last position the content of notes in some extra page. is it ?

Re: How to create report with "Notes" info?

PostPosted:Mon Nov 12, 2012 10:16 am
by TonyW
Correct.
- Creation of PDF (that can be saved outside the OpenKM or hard-printed later) is OK.
You want downloading a file which adds at the end the saved notes no ?
: yes, that is what we want.

If this is not possible, downloading only the notes in a PDF (document name, name of note creator, date and content of the note) is the absolute minimum we need.

Thanks

Re: How to create report with "Notes" info?

PostPosted:Wed Nov 14, 2012 7:29 pm
by jllort
Yes, both are possible. But should be implemented, and are quite different, first need some major effor than second that's simply report. Tell me which you prefer and I will try to guide on it.

First case will need:
Servlet, create pdf report with only notes and then merge both pdf ( that's something we have yet implemented )

Second case is a report with scripting feature

Re: How to create report with "Notes" info?

PostPosted:Mon Nov 19, 2012 10:04 am
by TonyW
Since I only start to use OpenKM and I have only limited java experience, I think it is a good idea to go with the easiest solution.
If I understand your responses, the easiest is a separate report with only the notes. So I would be very happy if you could help me with that.

Many thanks for this.

Re: How to create report with "Notes" info?

PostPosted:Tue Nov 20, 2012 12:36 pm
by pavila
You can use both OKMDocument and OKMNote API to obtain a list of documents, and list notes for every document. Take a look at OpenKM Doxygen to lear more.

Re: How to create report with "Notes" info?

PostPosted:Fri Apr 27, 2018 12:47 pm
by tumi
Bump. I also need to create a report from each node's notes and merge it to the original node (pdf) if possible. I also would like to trigger this automatically when I'm exporting to zip the parent folder. Is this possible?

Re: How to create report with "Notes" info?

PostPosted:Sat Apr 28, 2018 8:23 am
by jllort
When you export to zip, the document + notes into ( merge ) will be updated into OpenKM or you only want this merge to be applied to the exported documents? I suppose is the second scenario, otherwise each time you export files, the notes will be merged again an again at the end of the document.

Do your files are PDF's? or another document types ?

Re: How to create report with "Notes" info?

PostPosted:Mon Apr 30, 2018 6:21 am
by tumi
I want them to merge to exported documents, because in this scenario I would be deleting the original files from OpenKM. And the files are PDF's.

Re: How to create report with "Notes" info?

PostPosted:Thu May 03, 2018 7:14 am
by tumi
But does this mean that "Export Folder as ZIP"-event is not available in Community Version?
https://www.openkm.com/wiki/index.php/A ... ents_table

Re: How to create report with "Notes" info?

PostPosted:Fri May 04, 2018 6:18 pm
by jllort
The table in the previous link you shared here, is only for professional edition version 7 ( really all the documentation in the wiki should be considered deprecated in favour of https://docs.openkm.com/ )

In community version, you do not have the export as zip event, should be implemented. But I do think you do not always make this operation for all the documents you are downloading. I think will be better some crontab task or an specific customization based in jsp for it.

Re: How to create report with "Notes" info?

PostPosted:Tue May 08, 2018 10:13 am
by tumi
The case is that if I'm "migrating" some of the data from OpenKM to another system I need to get the notes with me. But I think this isn't happening so often so I dont necessarily need the automation for this operation. So I can manually run a script which creates report from each sub-file under specific root-directory (for example :/okm/root/test) and names them after the original file.

Should I use API OKMNote or is there a better way to do it? I tried it but I don't get any result for example with "list example".
And how can I create report with script?

Re: How to create report with "Notes" info?

PostPosted:Wed May 09, 2018 9:47 am
by jllort
I think the easiest is use the default repository exporter tool what comes with OpenKM what generate .okm file what really inside is a JSON. This JSON object is a Document, Folder etc... and you can quickly read and make what you wish with it.