Issue2648

classification
Title: Show report on screen with Python and JasperReport
Type: Severity: critical
Components: None Versions:
Milestone:
process
Status: closed Resolution: invalid
Dependencies: Superseder:
Assigned To: Nosy List: jeff.allen, rmatarrita
Priority: Keywords:

Created on 2017-11-27.20:02:01 by rmatarrita, last changed 2018-03-07.21:51:14 by jeff.allen.

Messages
msg11685 (view) Author: Roberto Matarrita (rmatarrita) Date: 2017-11-27.20:02:00
I need help. How to do to see a report made in jaspertreport, and executed from python. Let it show on the screen before burning it to disk. In a desktop application.

This is code.
import sys
import os
import PyPDF2
import pyjasper
from platform import python_version
from pyjasper.jasperpy import JasperPy
from PyPDF2 import PdfFileMerger,PdfFileReader

 
#def advanced_example_using_database():
input_file = os.path.dirname(os.path.abspath(__file__)) + '/report4.jrxml'
output = os.path.dirname(os.path.abspath(__file__)) + '/reportes'
print(input_file)
print(output)
 
con = {
        'driver': 'postgres',
        'username': 'postgres',
        'password': 'Administra8080',
        'host': 'localhost',
        'database': 'municipal',
        'port':'5432'
    }
x=input("Digite codigo de empleado :")
jasper = JasperPy()
jasper.process(input_file,output_file=output,format_list=["pdf"], parameters={'idenifica': (x)},db_connection=con)
msg11766 (view) Author: Jeff Allen (jeff.allen) Date: 2018-03-07.21:51:14
Seems more of a Jasper question than a Jython one. I don't think anyone here knows. Closing this, believiong it not to be a Jython issue.
History
Date User Action Args
2018-03-07 21:51:14jeff.allensetstatus: open -> closed
resolution: invalid
messages: + msg11766
nosy: + jeff.allen
2017-11-27 20:02:01rmatarritacreate