• Help needed in Reports

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #13027  by raths
 
hello all

I need help in reporting . Can any one give me a XML code that will give the report of the 'Name of documents uploaded by a user in one month ' ?

Regards
Rathnavel
 #13735  by Sascha
 
Hello okm'ers,

I am trying to implement the simple report example (RegisterdUsers.jrxml) from the wiki. after importing and executing it, there is no result. When I open the report I get this error:
Code: Select all
Class: 	net.sf.jasperreports.engine.JRException
Message: 	Errors were encountered when compiling report expressions class file: 1. Cannot cast from Date to String value = (java.lang.String)(new Date()); //$JR_EXPR_ID=8$ <----------------------------> 2. Cannot cast from Date to String value = (java.lang.String)(new Date()); //$JR_EXPR_ID=9$ <----------------------------> 3. Cannot cast from Date to String value = (java.lang.String)(new Date()); //$JR_EXPR_ID=8$ <----------------------------> 4. Cannot cast from Date to String value = (java.lang.String)(new Date()); //$JR_EXPR_ID=9$ <----------------------------> 5. Cannot cast from Date to String value = (java.lang.String)(new Date()); //$JR_EXPR_ID=8$ <----------------------------> 6. Cannot cast from Date to String value = (java.lang.String)(new Date()); //$JR_EXPR_ID=9$ <----------------------------> 6 errors
Date: 	Wed Feb 01 13:45:44 CET 2012
I use Aqua Data Studio vor editing the .jrxml-files. With this tool I also generate an .jasper-file, but there is also no result. That means the PDF, Rich-Text, CSV-files are empty.

My first question is how to get the example to run. Maybe someone knows what the error means.
Secondly I need to know, how I can get the database relationship-model for scripting some custom reports.

Best regards
Sascha
 #13757  by jllort
 
Error is clear, you've got Date date and want to represent in String field you should represent in Date field with some pattern if not must convert Date to String as $date.getYear + ":" $date.getMonth as String value etc.... but i recommend use Date field to represent it ( you can change the type from java.lang.String to Date )
 #13768  by Sascha
 
Hello okm'ers,

thanks to jllort for the helping post. I had remove the "date"-code and then it worked.
Furthermore the font "arial" must be replaced by for example "sanserif", because it´s not installed on my linux system.

Thanks for releasing 5.1.9. I will test it soon.
 #13769  by Sascha
 
Hello okm'ers,

now I want to setup some more complex reports. In the example below you had use some java DAO´s. I couldn´t find an object for something like "getUploadedFiles" in the DAO-Package

http://doxygen.openkm.com/5.0.x/dc/d57/ ... _1dao.html

Do you know "on-the-fly" if there is something like this implemented. I need a report where the user or a group is listed in one row with his uploaded files since the last week (or since yesterday,...). Perhaps it is implemented in the UserItemsDAO, but I don´t know how to extract it right.
Code: Select all

usr.put("id", user.getId());
  usr.put("name", user.getName());
  usr.put("email", user.getEmail());
  usr.put("roles", user.getRoles().toString());

#########for examle###########
usr.put("uploaded", user.getUploadedFiles().toString());
#############################

 #13787  by pavila
 
You can use OKMDashboard.getLastUploadedDocuments() method to get a list of the last uploaded documents.
 #13791  by Sascha
 
Hi okm'ers,

thank you very much for the fast help. Now I know, where to find the right DAO's.

My case wents more complex.The report should fire up a query that looks for users that are legitimated to a special directory-structure. Than this users become an report by email about the dailly processes ( means document-updates / new documents listed ).

I hope it clear what I mean?! My question is how could this be implemented in the script and is it necessary to use a cron for the dailly, weekly,... requirement? What method is recommended for the mailing to custom users?

Thanks
Sascha

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.