Issue2648

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

Created on 2017-11-27.20:02:01 by rmatarrita, last changed 2017-11-27.20:02:01 by rmatarrita.

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)
History
Date User Action Args
2017-11-27 20:02:01rmatarritacreate