Message11685

Author rmatarrita
Recipients rmatarrita
Date 2017-11-27.20:02:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1511812921.21.0.213398074469.issue2648@psf.upfronthosting.co.za>
In-reply-to
Content
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:01rmatarritasetrecipients: + rmatarrita
2017-11-27 20:02:01rmatarritasetmessageid: <1511812921.21.0.213398074469.issue2648@psf.upfronthosting.co.za>
2017-11-27 20:02:01rmatarritalinkissue2648 messages
2017-11-27 20:02:00rmatarritacreate