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
Varun99Varun99 

Access reports via apex

Hi,

 

I got response using pagereference using url. But how to parse the report data foldername,name ,url,description

Can any one help?

 

This is my response

 

<?xml version="1.0" ?> <result> <report foldername="My Personal Custom Reports" name="111111111"><id>00O90000002kwNQ</id><url><![CDATA[00O90000002kwNQ?isExcel=1]]></url><isPublic>false</isPublic></report> <report foldername="My Personal Custom Reports" name="111111111111"><id>00O90000002lJ1Y</id><url><![CDATA[00O90000002lJ1Y?isExcel=1]]></url><isPublic>false</isPublic></report> <report foldername="My Personal Custom Reports" name="123"><id>00O90000002kwEX</id><url><![CDATA[00O90000002kwEX?isExcel=1]]></url><isPublic>false</isPublic></report> <report foldername="My Personal Custom Reports" name="1w2222"><id>00O90000002kwVZ</id><url><![CDATA[00O90000002kwVZ?isExcel=1]]></url><isPublic>false</isPublic></report> <report foldername="My Personal Custom Reports" name="a"><id>00O90000002nREE</id><url><![CDATA[00O90000002nREE?isExcel=1]]></url><isPublic>false</isPublic></report> 

 </result>

Thank you

 

hitesh90hitesh90

Hi varun,

 

you have to parse this XML using XmlStreamReader.

i have given link there is also one example of this.

 

Important :
Hit Kudos if this provides you with useful information and if this is what you where looking for then please mark it as a solution for other benefits.

Thanks,
Hitesh Patel
SFDC Certified Developer & Administrator

 
Varun99Varun99

Hi hitesh,

 

 

Thank you for reply.