Generate a report via script?

tim_schneider
Tera Contributor

Hi,

I've looked through documentation and done some searching but I'm a bit stumped. Does anyone know if it's possible to generate a standard ServiceNow report (Such as a pie chart) to a file (e.g. png, jpg, pdf) via script?

I'm looking to attach the result into an existing process, but it is desirable for the report to generate itself rather than forcing the user to go, view the report, export it, then attach it back into the process... but I'm having no luck finding a mechanism to do this without user-interaction.

Thanks.

14 REPLIES 14

That's all about the data going into the report & nothing about the generation which is what my question is relating to. My report is fine and has all the data it needs, I just need to be able to save the result from a background process & my destination is an attachment, not an email.

Fabricio4
Mega Sage

Years later, I find myself in the exact same predicament. @tim_schneider , have you found a solution for this? Assuming you would even remember this 6 years later, haha.

Sadly no - we had to abandon the requirement as simply not supported on platform. It resulted in an external BI reporting platform being used instead to meet the use-case. I haven't revisited much in the last 6 years so maybe something was added in-between but at least back then it simply proved impossible to do in a supportable way on platform.

Many thanks for your reply, Tim.

Yeah, the only way I can see this working is to do a scheduled report to an instance e-mail and then fetch the image inside the e-mail (or use an inbound action). Not an elegant solution.

It's honestly baffling there's no OOB way to do this, especially because making native reports available to the public on the Portal is a no no. My requirement is to make reports available to the general public (that is, non logged in users), but since that is definitely not a recommended practice, a work around would be to simply make png snapshots of the reports available on the Portal.

Thanks for your insight anyway.

Curious @Fabricio4 why you're saying we shouldn't be making native reports available to the public. Could you elaborate on that?