Hi, I have this in my Ignition web page .py but I have a problem so, I want to show this report
but right now when I access via url the reports download but I want to show in the computer
not download show in the url such as a web page but the report, can someone help me please ? I try change the name to reporte_autonomo or reporte_autonomo.py but it don't works in this case when I have reporte_autonomo.py download not the pdf download a .py file. Please help me
def doGet(request, session):
equipo_id = request['params'].get('equipoId')
reportPath = "RENEW/PLANILLAS/AUTONOMA/PLANILLA_AUTONOMA"
parameters = {"idEquipo": int(equipo_id)}
pdf_bytes = system.report.executeReport(path=reportPath,project="Mantenimiento_vn",parameters=parameters,fileType="pdf")
return {
"bytes": pdf_bytes,
"headers": {
"Content-Type": "application/pdf",
"Content-Disposition": "inline; filename=planilla_autonoma.pdf"
}
}
When I want to showw the report in the web thsi download
And not download such as pdf when I open with adobe it show very very disconfigured.
Please help me to show in the web without download it