Make a report with a byte array

I am trying to create a report but I already have queried and formatted a string in python. I then took that string and converted it to a byte array. How do I create a report to email with the string that I converted to a byte array?
Or is there a way to save my formatted string to the ignition server in a file and then retrieve that file like a local machine can do?
Any help would be greatly appreciated.

If you are trying to email a report after using then you need to use instead. - Ignition User Manual 8.1 - Ignition Documentation (

I have not created a report yet. I am wondering if there is a way to create the report with a formatted string or a byte array?
Thank you for your help

Not that I know of.

Since 8.1.16 you can pass a byte array directly into a report as a parameter. You can provide a PDF (binary) and embed it inside a report via the image component.

I’m really not clear on what you’re actually doing/trying to do, though.

My interpretation is that they’re just looking to send an email with some arbitrary attachment they’ve already managed to create…

I am trying to email a query from 2 different databases and put them in one queried string with the scripting. I formatted and saved the string to a local file and then emailed it, but I wanted to email the file I created so it has to be saved on the local machine. Only problem is it cant be saved locally to a machine and needs to be saved to the server. I am trying to either save the file to the server to then email so its not on a local machine or somehow take my formatted string or the byte array and put it into a report.
It seems the only way to save to the server that I have found is through reports which I am not familiar with yet.

If your script is running in the gateway somewhere you can just use system.file.writeFile to write it somewhere the gateway can access.

I can save it to my local machine with system.file.writeFile(). What are the places I can write it to in the server where gateway has access? I am very new to ignition thank you.

The writeFile script would have to be called in the gateway scope where it would write on the gateway server. This could be done by using a gateway handler message, or a tag event.

If the script is called in a Vision client, then it would be called in a client scope (local).

Gateway Event Scripts - Ignition User Manual 8.1 - Ignition Documentation (