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
bikla78bikla78 

schedule printable view report in web html

I have a custom report that was built in the reports tab. Is there anyway I can schedule the printable view of the report as a web html file and schedule an export it to a location on my hard drive.
bob_buzzardbob_buzzard

You can schedule the report to run and email the results out, but I don't believe there is a standard SalesForce way to achieve what you want.

 

One of achieving this is through browser emulation and screenscraping - it can be done, but my experience is that you'll burn plenty of time coding it up and getting it to work.  Another option would be to capture a browsing session through Firefox and Selenium and replaying it at a scheduled time.

 

 

JimRaeJimRae

I would agree with Bob, you could email them with a scheduled report, but I don't think you can set them to save to the desktop.

There is an older article about report scraping that I have tried, but was not able to get working:

http://sfdc-heretic.warped-minds.com/2006/04/10/progmatic-access-to-salesforcecom-reports/

 

This is supposed to give you access to the report body in your code, and then you can manipulate it.

The real issue with your request is saving it to your local system at a scheduled time.  As a SaaS application, it is system independant, there are no real modules to do what you are suggesting directly in the API.

 

My only other suggestion for this, and I have never done it, would be to create an actual Java application that leverages the API to get the data, and can then write it to your local file system.  You would need to reformat the data into your report format manually.

 

I wonder if you could describe more about what your actual goal is with this project? Why are you trying to save the printed view of the report on your desktop? If you are doing it for historical purposes, you might consider using an analytical snapshot instead.  You could save the data on a daily basis, and then run the report for any day you snapped against your snapshot data and generate the report.  You could also do reports that compare the data across different periods of time.

 

 

 

bikla78bikla78

Hi Jim,

 

The primary objective for this project is to provide a non salesforce user access to our salesforce dashboard on a weekly basis. Therefore, I was thinking to export the report in html form on our network so we can post in our company intranet. Is this something I could do with an analytical snapshot? We also want to minimize emailing these reports out due to security issues so we would like to post the report on a seperate site or application if possible.

 

Thank you

 

 

JimRaeJimRae

Well, that is not the type of thing that SFDC would want you to do of course.  The Analytical snapshot won't necessarily help you with this type of requirement. What we do is extract data via the API to a warehousing solution and then generate separate dashboards there.  We use Pentaho to extract the data from SFDC, and place in an Oracle DB, and then our development team created the the dashboard views using HTML and some type of charting libraries (like Dojo).  

bikla78bikla78
But how do I extract that same report via the SF API? Can I reference report objects or do I have to design it from scratch?
JimRaeJimRae

You would need to design it from scratch, pull the same data, and then format it to look like your report.  Or, you could use that report scraping article I posted a link to to get the XML version of the same report, then format the XML the way you want it.  Neither are very elagent solutions, and both require a lot of manual work, in my experience.

Sorry I don't have a better answer, maybe someone else will speak up with a better solution.

bikla78bikla78

Okay. No problem. However, what toolkit is out there that I can use to write SOQL queries and pull the data. Also, would I be able to write a nested join to pull the report or do I have to pull each file(table) seperately by using the apex dataloader and create a seperate application all together that uses the data completley outside of the force.com platform and create the report(is that what you mean)

 

Thanks

JimRaeJimRae

There are lots of posts on the forums about this.  We use two methods here at my company.  You can use the Data Loader to extract data from SFDC directly to a JDBC data store, do this with some batch scheduler, then you can manipulate the data in the warehouse. For example, extract the data you need from SFDC and place them in similar object tables in Oracle, or some other RDBMS system.  Then you can do regular SQL joins to get the report data you need to display.

 

The other thing we do is use Pentaho, an open source ETL tool, to extract data for reporting on our sales portal.  

 

I am sure there are other methods as well, but these are 2 you could start investigating as possibilities.

 

 

bikla78bikla78

Thanks Jim, I am downloading the pentaho bi suite right now. I guess what I could do is pull the data from SFDC via the CLI in the dataloader and schedule a batch operation to our company ftp. Depending on Pentaho's archichecture, if I grab the .csv files and design the report there, it should do the trick. Do we have to pay for Pentaho after a trial...i didnt know we had to pay for the open source stuff

 

thanks again for all youir help and insight

JimRaeJimRae
That could work.  I don't believe you have to pay for Pentaho per se, you only need to pay if you want direct support from them.