+ Start a Discussion
Aneesha SAneesha S 

Error: Compile Error: Invalid type: Reports.ReportInstance

Hello,

I am trying to use the Report and Dashboard API to run a report from apex using the mechanism explained here https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_analytics_run_reports.htm

When I try to save this however I am getting the error Error: Compile Error: Invalid type: Reports.ReportInstance. I am unsure why this error is coming up. I have checked the documentation with no help. Is there some setting that needs to be enabled in the org?
ra1ra1
Hi,

Can you verify that your apex class API version and update it to latest.

Thanks,
Aneesha SAneesha S
Hello - it is at the latest version (38.0)