system.db.runNamedQuery in a report

I am trying to create a script data source for a report. The script is calling system.db.runNamedQuery to get some of the data. The problem I seem to be having that there are two version of this function, one for project scope, the other for gateway scope (with the project name as the first arg). The report will run with project scope during testing or called from a window, but it run from gateway scope when scheduled automatically. Correct?

Is there anyway to make the function work either way.

If it's actually in a data source for the report, it's always running on the gateway.

1 Like