function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
lalilali 

how to get the Soql query of a report

HI All,
how to get the Soql query of a report in a batch class so that I can have it in the Database.QueryLocator Start method?

please any help...

Thanks
lalitha
PratikPratik (Salesforce Developers) 
Hi Iali,

You can refer to this:
https://www.salesforce.com/developer/docs/api/Content/sforce_api_objects_report.htm

Thanks,
Pratik
lalilali
Hi Pratik,
sorry that didn't help. my question is I have the reportid from the  report object . programatically , I want to be able to get the SOQL qery that the report uses so that I can execute that to get the results of the report.

Thanks
Lalitha