rroca
November 6, 2018, 2:50pm
1
Hi,
Is it possible to execute a Report changing a parameter value using system.report.executeAndDistribute() in a button?
I have some Reports with the same design but I need to change a parameter value, for example, I have Alarm Reports from different PLC, the report structure is the same for each PLC.
Yes, you can set parameter values. See the documentation, there’s an example near the bottom here: https://docs.inductiveautomation.com/display/DOC79/system.report.executeAndDistribute
2 Likes
rroca
November 6, 2018, 7:39pm
3
Thank you! I have a new problem:see_no_evil:, this is my code
Param={“Disparos”:“Datasets_Backups/Disparos/PLC500_Disparos_BombaB/DataSet”}
settings={“path”:“C:\Reportes\PLC-500”, “fileName”:“Reporte Disparos Bomba B.pdf”, “format”:“pdf”}
system.report.executeAndDistribute(path=“Reporte Disparos”, project=“UCC”, parameters=Param, action=“save”, actionSettings=settings)
but my report it’s not ok and I don’t know why
What am I doing wrong?
This is probably supposed to be a tag read; try:
Param={"Disparos": system.tag.read("Datasets_Backups/Disparos/PLC500_Disparos_BombaB/DataSet").value}
1 Like
rroca
November 6, 2018, 7:44pm
5
Thank you soooooooooo much!!! It works perfectly now
1 Like