So I've been given the task to create a weekly report that is sent by email (as an Excel file) to the administrator.
The report has to contain all the open leads, and the ones that were closed in the last week. And it also has to contain history data (meaning that we need to see the dates when the status of the lead was changed).
I looked into the built-in SalesForce reports, and I saw that there's one report on "Lead History" but I couldn't join it with the "Lead" report type.
I might've been looking at the wrong place, but it sure seams that if I want to have a report on "Leads", I can't see the history, and vice-versa.
Then, as a second complication, the administrator needs this report as an Excel file, where each row describes one lead.
After seeing that I can't join the "Leads" and "Lead History" report types, I thought that I would have to develop some batch Apex code, that runs through the leads, and creates some kind of .csv file, that is then attached as an email attachment, and sent to the administrator. Then this thing would be scheduled to run each week.
Am I on the right track here? Or it shouldn't be necessary to do a complete custom apex development for this? If the lead history fields would be accessible from the lead report, then it would be really great...