hi
i have problem with pyreportjasper when i click print i git this error
Error occurred during initialization of VM
Could not find agent library instrument on the library path, with error: La procÚdure spÚcifiÚe est introuvable
Module java.instrument may be missing from runtime image.
i install jdk 23 and i work with django 4.1 and pyreportjasper 2.1.4
this is my print function in views.py
def Demande_Intervention(request):
REPORTS_DIR = os.path.join(os.path.abspath(os.path.dirname(__file__)),)
input_file = os.path.join(REPORTS_DIR, 'Demande_Intervention.jasper')
output_file = os.path.join(REPORTS_DIR, 'Demande_Intervention')
print(input_file)
print(output_file)
jasper = PyReportJasper()
con = {
'driver': 'postgres',
'username': settings.DATABASES['default']['USER'],
'password': settings.DATABASES['default']['PASSWORD'],
'host': settings.DATABASES['default']['HOST'],
'database': settings.DATABASES['default']['NAME'],
'port': settings.DATABASES['default']['PORT'],
'jdbc_driver': 'org.postgresql.Driver'
}
pyreportjasper = PyReportJasper()
pyreportjasper.config(
input_file,
output_file,
output_formats=["pdf", "rtf"]
)
pyreportjasper.process_report()
return FileResponse(open(output_file +'.pdf', 'rb'), as_attachment=True)
so please help me to solve this problem
3 posts - 2 participants