{"action":"opened","issue":{"url":"https://api.github.com/repos/jadsonbr/pyreport/issues/20","repository_url":"https://api.github.com/repos/jadsonbr/pyreport","labels_url":"https://api.github.com/repos/jadsonbr/pyreport/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/jadsonbr/pyreport/issues/20/comments","events_url":"https://api.github.com/repos/jadsonbr/pyreport/issues/20/events","html_url":"https://github.com/jadsonbr/pyreport/issues/20","id":276478957,"number":20,"title":"Print Screen from Reports for Python, with JasperReports.","user":{"login":"rmatarritaq","id":33942186,"avatar_url":"https://avatars3.githubusercontent.com/u/33942186?v=4","gravatar_id":"","url":"https://api.github.com/users/rmatarritaq","html_url":"https://github.com/rmatarritaq","followers_url":"https://api.github.com/users/rmatarritaq/followers","following_url":"https://api.github.com/users/rmatarritaq/following{/other_user}","gists_url":"https://api.github.com/users/rmatarritaq/gists{/gist_id}","starred_url":"https://api.github.com/users/rmatarritaq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmatarritaq/subscriptions","organizations_url":"https://api.github.com/users/rmatarritaq/orgs","repos_url":"https://api.github.com/users/rmatarritaq/repos","events_url":"https://api.github.com/users/rmatarritaq/events{/privacy}","received_events_url":"https://api.github.com/users/rmatarritaq/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-11-23T22:16:42Z","updated_at":"2017-11-23T22:16:42Z","closed_at":null,"author_association":"NONE","body":"I found this code posted by Mr Jadsonbr, adapted to my needs, and it works.\r\n\r\nI have the following questions.\r\n1. Can i see the report on screen before you burn it to disk.\r\n2. How to send parameters to the report, for example the invoice number, company code.\r\n\r\nTanks\r\nRobert\r\nCosta Rica\r\n\r\nimport sys\r\nimport os\r\nimport pyjasper\r\nfrom platform import python_version\r\nfrom pyjasper.jasperpy import JasperPy\r\n\r\n#def advanced_example_using_database():\r\ninput_file = os.path.dirname(os.path.abspath(__file__)) + '/report4.jrxml'\r\noutput = os.path.dirname(os.path.abspath(__file__)) + '/reportes'\r\nprint(input_file)\r\nprint(output)\r\n \r\ncon = {\r\n        'driver': 'postgres',\r\n        'username': 'postgres',\r\n        'password': 'Administra8080',\r\n        'host': 'localhost',\r\n        'database': 'municipal',\r\n        'port':'5432'\r\n    }\r\njasper = JasperPy()\r\njasper.process(input_file,output_file=output,format_list=[\"pdf\"],db_connection=con)"}}
{"actor":{"display_login":"rmatarritaq"}}