system.report.executeReport in Perspective

Hi guys, have a nice days.

I would like to use the executeReport function to generate a PDF file.

    overrides = {"myStringParam":"Hello world", "myIntParam":3}  
    bytesArray = system.report.executeReport(path="Audit", project="Copy_Of_teqa_1", 
    parameters=overrides, fileType="pdf")
    system.perspective.download(bytesArray)

The script above could not work. Anyone can help or give any advice. Thanks in advance. By the way, may I know what actually I need to write for path and project.

The docs for system.perspective.download specify that there are two required arguments: filename and data. You are only specifying the data portion in your code.

Try:

system.perspective.download('MyReport.pdf', bytesArray)

Hi Bro cmallonee, I try already cant work. I think is because my path and project wrong. Can you further explain what actually I need to write for system.report.executeReport path and project because the docs that explain in Ignition forum is not clear.

The path of the report as it appears in the Designer, so a Report displayed at

Reports
L_ MyDir
   L_ MyReport

Should be referred to with this:

# I left off the fileType kwarg because you're using the default anyway
system.report.executeReport("MyDir/MyReport", parameters={"myStringParam":"Hello world", "myIntParam":3})