+ Start a Discussion
sfdcsushilsfdcsushil 

bulkretrieve using Force.com Migration Tool returns zero reports

Hello, 

As per documentation, SF:bulkRetrieve command can be used to retrieve all reports in bulk(Link below). 

https://developer.salesforce.com/docs/atlas.en-us.daas.meta/daas/forcemigrationtool_retrieve_bulk.htm?search_text=Report

When i try retrieving the reports, it gives me following message  - 

[sf:bulkRetrieve] Total number of items to be retrieved for Metadata type 'Report' = 0

But we do have more than 30,000 reports in system. Any idea why would it throw the message? 
Best Answer chosen by sfdcsushil
sfdcsushilsfdcsushil
Thanks Nagendra for response. I am not sure if my question was very clear. If not, i am sorry about that. I was looking for a way to download all the reports in the system. So i tried above documentation which states taht you need to use bulkretrieve ANT action. But that did not work. I contacted support since i could not find the reason of issue. They did some research and confirmed that their is a additional paramter that needs to be passed(Folder name) - 

e.g. containingFolder="unfiled$public"

so final command in build.xml will look like below 

 <sf:bulkRetrieve username="${sf.username}" password="${sf.password}" sessionId="${sf.sessionId}" serverurl="${sf.serverurl}" maxPoll="${sf.maxPoll}" metadataType="${sf.metadataType}" retrieveTarget="retrieveUnpackaged" containingFolder="${sf.containingFolder}"/>

And you will have folder name and metdata type defined in built.properties as show below 

sf.metadataType = Report
sf.containingFolder = unfiled$public

All Answers

NagendraNagendra (Salesforce Developers) 
Hi Sushil,

May I suggest you please check with below process once and let us know if it works for you.

I'd suggest trying to move just a single report. Just to be clear, the steps are:
  • Download a fresh copy of your reports metadata via Eclipse
  • Manually edit the package.xml to change the folder of a report. (I think you need to make sure the folder exists on the server, and that you are referring to the developer name of it, e.g. Folder_A/My_report)
  • In the underlying file system, move that report to a folder of that name
  • In Eclipse, do a project refresh from the local file system (NOT the server)
  • In Eclipse, do a save to server the report should move
  • If this also does not work, post your package.xml before and after, and the exact steps you followed.
Please let us know if this helps.

Best Regards,
Nagendra.
sfdcsushilsfdcsushil
Thanks Nagendra for response. I am not sure if my question was very clear. If not, i am sorry about that. I was looking for a way to download all the reports in the system. So i tried above documentation which states taht you need to use bulkretrieve ANT action. But that did not work. I contacted support since i could not find the reason of issue. They did some research and confirmed that their is a additional paramter that needs to be passed(Folder name) - 

e.g. containingFolder="unfiled$public"

so final command in build.xml will look like below 

 <sf:bulkRetrieve username="${sf.username}" password="${sf.password}" sessionId="${sf.sessionId}" serverurl="${sf.serverurl}" maxPoll="${sf.maxPoll}" metadataType="${sf.metadataType}" retrieveTarget="retrieveUnpackaged" containingFolder="${sf.containingFolder}"/>

And you will have folder name and metdata type defined in built.properties as show below 

sf.metadataType = Report
sf.containingFolder = unfiled$public
This was selected as the best answer