We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Warning log - report visualization

MaríaR
Tera Contributor

I'm trying that a user can visualize a report, and I'm troubleshooting it.

 

I'm impersonating the user and opening the report, and I'm getting this warning log: "com.glide.script.RhinoEcmaError: "rep" is not defined. <refname> : Line(1) column(0) ==> 1: rep != null && rep != undefined && rep.isReportNotBackwardCompatible() Stack trace: at <refname>:1"

 

Can someone guide me on this? I'm totally clueless about what's happening or how to solve it

1 REPLY 1

Matthew_13
Mega Sage

Hi My Friend,

That warning is basically saying: some script is running while the report page loads and its tryying to use a variable called rep, but for your user it doesn’t exist — so the report UI throws "rep" is not defined.

I seen this usually happen when:

  • the report UI expects a “report object” to be available but it only gets created under certain conditions often tied to roles or how the report is opened or

  • there’s a customization/UI script that isnt handling the rep not available case.

What I say you can do:

  1. Check if the report actually fails to load or if it’s just a warning.
    If the report still displays, it may just be noisy logging.

  2. Compare roles between a user who can open the report cleanly and the impersonated user. Missing reporting roles can change what objects the UI initializes.

  3. Search the instance for that exact snippet (isReportNotBackwardCompatible or rep != null).
    You’ll likely find it in a UI Script/Macro/Page. If its custom it needs a safer check like only run this if rep exists.

Also separate point i think: even if the UI loads, the user might still see blank data if they don’t have read access to the report’s underlying table/fields.

 

@MaríaR - If help you answer; Please mark Solution Accepted and Thumbs Up

MJG