nimaraheesh Posted November 8, 2023 Share Posted November 8, 2023 def getreport(): result = {} formdata = request.vars to_date = formdata['to_date'] from_date = formdata['from_date'] vehicle_no = formdata['veh_no'] customer = formdata['customer'] estimate = formdata['estimate'] invoice= formdata['invoice'] jobcard = formdata['jobcard'] data = """ <reportExecutionRequest> <reportUnitUri>/reports/samples/naokiDemo</reportUnitUri> <async>true</async> <freshData>false</freshData> <saveDataSnapshot>false</saveDataSnapshot> <outputFormat>pdf</outputFormat> <interactive>false</interactive> </reportExecutionRequest> """ jasper_view = JasperView("jasperadmin", "jasperadmin", data) report_pdf = jasper_view.post() # Get the report in PDF format # Set the appropriate headers and return the PDF as the response response.headers['Content-Type'] = 'application/pdf' response.headers['Content-Disposition'] = 'inline; filename="report.pdf"' return report_pdfits part of my web2py controller now i want to send some data to jasper report query to get some dynamic results Link to comment Share on other sites More sharing options...
Mehak Rajkumar Posted November 16, 2023 Share Posted November 16, 2023 Thank you for posting to the Jaspersoft Community. Our team of experts has read your question and we are working to get you an answer as quickly as we can. If you have a Jaspersoft Professional Subscription plan, please visit https://support.tibco.com/s/ for direct access to our technical support teams offering guaranteed response times. Link to comment Share on other sites More sharing options...
Solution nimaraheesh Posted November 16, 2023 Author Solution Share Posted November 16, 2023 i got it data = { "reportUnitUri": "/reports/samples/naokiDemo", "async": "false", "freshData": "false", "saveDataSnapshot": "false", "outputFormat": "pdf", "interactive": "false", "parameters":{ "reportParameter":[ {"name":"queryConditions","value":[QCondition]}, {"name":"headPara","value":[repHead]} ] } } 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now