Hello @luisfmfernandes,
Is it possible to let your plugin jasper report render the script report example the Profit and Loss, Balance Sheet etc. ?
Hello @luisfmfernandes,
Is it possible to let your plugin jasper report render the script report example the Profit and Loss, Balance Sheet etc. ?
@luisfmfernandes I successfully installed the app. I am stuck in uploading the jrxml. It has an error Please install pyjnius python module
. I have followed the instruction Install pyjnius with bench update --requirements
. I even tried to do this pip install -U -r requirements.txt
under the folder of the app and it was successfull. This is the instruction I followed jasper_erpnext_report/README.md at master · saguas/jasper_erpnext_report · GitHub
jasper_erpnext_report/config.txt at master · saguas/jasper_erpnext_report · GitHub.
I did check /frappe-bench/env/lib/python2.7/site-packages/jnius/ exist but not pyjnius.
This the my error log
New folder is 3 Home/Attachments/Custom Report Table Local thumbnail /files/Custom Report Table Local/CustomerReportTable.jrxml file_name Custom Report Table Local
20:47:57 web.1 | delete file_name CustomerReportTable.jrxml attach to doctype Jasper Reports attech to name Custom Report Table Local
20:47:57 web.1 | Remove this doc: doctype File docname e2fc9bd91d error: Please install pyjnius python module.
Any idea what causing this?
Hi @ccfiel .
Assuming that pyjnius is already installed (See terminal for confirmation.) then check if you have Attachments “virtual” folder in File Manager app.
Luis.
That is ok. You should have jnius
and jnius-1.1.dev0-py2.7.egg-info
folders and jnius_config.pyc
.
Yes. Now remove Custom Report Table Local virtual folder and then remove the report and try again.
Check the terminal you should see pyjnius is installed ok…
Luis.
Hello @luisfmfernandes,
I delete the virtual folder and delete report and add the report again. The same error I got.
22:18:02 web.1 | new folder is 3 Home/Attachments/Custom Report Table Local thumbnail /files/Custom Report Table Local/CustomerReportTable.jrxml file_name Custom Report Table Local
22:18:02 web.1 | delete file_name CustomerReportTable.jrxml attach to doctype Jasper Reports attech to name Custom Report Table Local
22:18:02 web.1 | Remove this doc: doctype File docname 8d703e276a error: Please install pyjnius python module.
I also check jnius and jnius-1.1.dev0-py2.7.egg-info
in my site-packages exist.
Hi @ccfiel, now iam not at home. Later i will see if this is a bug.
I have been adapting Jasper to the frappe changes. But frappe changes more rapidly them i get feedback.
Sorry, Luis.
Hello @luisfmfernandes,
Just a note I tried to debug your app. In this file jasper_erpnext_report/jasper_reports/compile_reports.py
cause the problem
import jasper_erpnext_report.jasper_reports as jr
import frappe
from frappe import _
def jasper_compile(jrxml, destFileName):
try:
compiler = jr.ReportCompiler() # <------- this causes the error
compiler.compile(jrxml,destFileName)
except Exception as e:
import jasper_erpnext_report as jer
if jer.pyjnius == False:
frappe.throw(_("Please install pyjnius python module. %s") % e)
return
frappe.throw(_("Error while compiling report %s, error is: %s." % (jrxml, e)))
I tried to output the exception this is the error 'module' object has no attribute 'ReportCompiler'
. I hope this helps
Hi @ccfiel.
You must check if you see in terminal pyjnius is installed: True
. It is important because i think it is not properly installed.
It is there, it is in jasper_reports/init.py line 42: ReportCompiler = getJavaClass('ReportCompiler')
.
Did you install java jdk?( sudo apt-get install openjdk-7-jdk
)
As you can see you get as error “Please install pyjnius python module” from this code: if jer.pyjnius == False: frappe.throw(_("Please install pyjnius python module. %s") % e)
which only show if jer.pyjnius == false (i.e is not installed or not properly installed.)
If you remove pyjnius check if jnius and all dependents are remove from env/… sub folders. Then when you install again check for errors when pyjnius is installing.
Let me know if you need more help.
If you get pyjnius installed correctly please update again because i have to update Table report jrxml file because fields of doctype Customer Addresses And Contacts
changed their names. Use instead file CustomerReportTableNew.jrxml
.
Luis.
Hello @luisfmfernandes,
I did install sudo apt-get install openjdk-7-jdk. I tried to uninstall pyjnius and Cython and install it again but still I cannot see pyjnius is installed: True
in my logs. I look at the code if pynius is not install I should see pyjnius is not installed: {}
but I did not. This is weird.
I think I have found the problem I need to set JAVA_HOME
Hello @luisfmfernandes,
I have solve the problem the app assumes that you have a 64 bit machine. I have a 32bit It will try to open file
/usr/lib/jvm/java-7-openjdk-i386/jre/lib/amd64/server/libjvm.so
that I do not have. I have /usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386/server/libjvm.so. I was able to upload the jxml file Thanks a lot for your patience!