Displaying a Report Over Multiple Projects

I have two projects, one which has the report object in the designer and on the other I want to have the ability to display reports for custom time ranges.

Originally I tried to use the report viewer to display the filtered report but when I tried to access the report under the ‘reportPath’ property drop down it wasn’t available.

I then tried a different tact by getting the report as a PDF through scripting and then displaying it via the PDF viewer component. This approach allowed me to get access to the report as I could specify the project that the report exists in. So using this technique I could generate the reports no problem, but it seems to run into a problem when I select too long a time range. When this happens the report generates with no data. I know the data and query are solid as I can generate a report for the same time range using a report viewer object. I don’t get any errors so am at a loss to where I should start looking.

So two questions:

1 Can you access reports from other projects using the report viewer? As you can access it through scripting I don’t see why you shouldn’t be able to using the report viewer (although you would probably need a new property for which designer the object lives in).
2 Any ideas why I wouldn’t be able to pull a large time range using the scripting function?

Any ideas would be great :slight_smile:

A report viewer cannot view a report from another project, although this may make a good feature request.

It is possible that the queries / evaluations are timing out with a larger time range. When you test these queries, how long do they generally take? Also, how long (in pages) is the resulting PDF? Lastly, which version of Ignition are you using?

The query isn’t too involved, and is only returning 86 rows, which is two pages. When testing in MSSQL it takes 1 second or less to do the query (hard to tell as 1 second is the finest resolution). Unfortunately I can’t test it in the query browser as it has a Common Table Expression which the browser doesn’t understand.

I’m using 7.9.1.

Would the script function, "system.report.executeReport"throw up an exception if the query timed out? I’m assuming the timeout would be at least a couple of seconds?

As a work around, you could export just the report and import into the other project.

Jonathan,
Is anything logged into the gateway console when these reports fail? I would suggest email/calling in to support so a rep can take a look at your issue and figure out what’s going on.

As a test, I made a report with a query of select sleep(10) and system.report.executeReport didn't time out.

I'd echo PGriffith's suggestion to check the logs (turn your reporting and database logger to debug if need be) for clues why your report is failing, and call support if need be. This is something that won't really be possible to debug for you in the forum.