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
sfdc.dev.ax856sfdc.dev.ax856 

Dashboard to PDF

Hi All,

 

        I have a similar req   http://success.salesforce.com/ideaview?id=08730000000BrLkAAK.Any help is greatly appreciated.

 

Thanks.

brunol11brunol11

Is it possible to create a VisualForce Page linked to the images on reports? I created one but did not uploaded the data. Need more tests on how to execute and on security issues.

 

If its possible, you can create a new formated dashboard and print as you need.

 

Just an idea and a start point.

sfdc.dev.ax856sfdc.dev.ax856

Hi Brunol11,

              

              Thanks for your reply.Can you please tell me how to create a vf page linked to images on reports.

 

Thanks Again.

brunol11brunol11

Jesus Christ!!! It works!!! lol

 

That´s a challenge. Here is step by step:

 

  • Create a new VisualForce Page
  • Go to you dashboard and right click in the dashboard panel and select "Copy Image URL".
  • Insert the copied url inside <img></img> tags on yous VisualForce Page
  • Format the page code with lines, tables, text or anything else you want to
  • Go to SETUP > CREATE > TAB. Create a new Visual Force Tab.
  • Choose your new Visual Force page 

Since you can render the APEX PAGE as PDF, you will have the final result as follows.

 

The only question is: when the Dashboard updates, does this Visual force update too? 

 

<apex:page name="Custom_Dash_Board" renderAs="PDF" showHeader="true" sidebar="false" title="Custom DashBoard">

<h1>Custom Dash Board By Bruno Lube</h1> 

 

<p>This is your new Dashboard. Format with tables, text, resize images, etc</p> 

 

<hr></hr> 

<P> 

<img src="https://sales.my.salesforce.com/servlet/servlet.ChartServer?rsid=0FLC0000000lIuG&ruid=00580000002Qdly&did=01Z80000000n2gp&s=8&fs=12&tfg=12&tfs=-16777063&explode=0&c=column&cs=1&title=Quantidade+por+Atendente&eh=no&compo=yes&fg=-1&bg1=-6710887&bg2=-13421773&bgdir=2&dl1=Contrata%C3%A7%C3%A3o%3A+Nome+do+propriet%C3%A1rio&dl2=Contrata%C3%A7%C3%A3o%3A+Data+de+cria%C3%A7%C3%A3o&l=1&sax=yes&Yman=no&nc=0&actUrl=%2F00OC0000004N9IF&sd=1&scv=no&sct=no&spt=no&cu=BRL&ab=Y&u=0&vt=0&ab2=X&u2=0&vt2=0&vl0=N%C3%BAmero+de+registros&spoc=no&topn=no&gm=0.0&gc0=-1&gm0=1.0&gc1=-1&gm1=2.0&gc2=-1&gm2=3.0&refreshts=1310437289000"> 

</img> 


<hr></hr> 

</p> 

  

<P> 

<img src="https://sales.my.salesforce.com/servlet/servlet.ChartServer?rsid=0FLC0000000lOaR&ruid=00580000002Qdly&did=01Z80000000n2gp&s=8&fs=12&tfg=12&tfs=-16777063&explode=0&c=pie&cs=0&title=Quantidade+por+Plano&eh=no&compo=yes&fg=-1&bg1=-6710887&bg2=-13421773&bgdir=2&dl1=Plano%3A+Plano+ou+Servi%C3%A7o&dl2=Contrata%C3%A7%C3%A3o%3A+Contrato&l=2&sax=yes&Yman=no&nc=0&actUrl=%2F00OC0000004NGj4&sd=1&scv=yes&sct=no&spt=yes&cu=BRL&ab=Y&u=0&vt=0&ab2=X&u2=0&vt2=0&vl0=N%C3%BAmero+de+registros&spoc=no&topn=no&gc0=-1&gc1=-1&gc2=-1&refreshts=1310437302000"> 

</img> 


<hr></hr> 

</p>

   

<P> 

<img src="https://sales.my.salesforce.com/servlet/servlet.ChartServer?rsid=0FLC0000000lObj&ruid=00580000002Qdly&did=01Z80000000n2gp&s=8&fs=12&tfg=12&tfs=-16777063&explode=0&c=column&cs=1&title=Quantidade+Por+Munic%C3%ADpio&eh=no&compo=yes&fg=-1&bg1=-6710887&bg2=-13421773&bgdir=2&dl1=UF&dl2=Cidade&l=1&sax=yes&Yman=no&nc=0&actUrl=%2F00OC0000004NGkH&sd=1&scv=no&sct=no&spt=no&cu=BRL&ab=Y&u=0&vt=0&ab2=X&u2=0&vt2=0&vl0=N%C3%BAmero+de+registros&spoc=no&topn=no&gm=0.0&gc0=-1&gm0=1.0&gc1=-1&gm1=2.0&gc2=-1&gm2=3.0&refreshts=1310437292000"> 

</img> 

</p>  


</apex:page>

 


As I said before, it´s just an Idea. I Hope it fits your needs.

brunol11brunol11

Good News, Great News!

 

The image updates everytime the dashboard is updated.

 

I hope you understood how to create the page.

 

Best Regards!

 

 

brunol11brunol11

I built an application for those who want to start solving this issue:

 

https://login.salesforce.com/packaging/installPackage.apexp?p0=04tC0000000YaH0

 

 

If it helps, mark this as "solved".

randombardrandombard

Is there a way to make this dynamic based on a selected dashboard?

brunol11brunol11

Actually, tha small free application creates a new PDF dashboard based on each panel report. So you can even mount your new report with images from diferent dashboards.

 

If I understood your question, it already fits your needs.

 

Can you give me an example on what you need?

 

Here´s a preview:

 

Dash2PDF preview

mstoranmstoran

I installed your app Bruno but how do I use it to create a PDF of my dashboard??

 

thanks!

brunol11brunol11

Hi!

 

After installed, you´ll have 2 new menu options: Panel2PDF and DashboardToPDF. and a VisualForce Page named DASH.

   

  1. First, you need to create you regular dashboard panel.- for example "Monthly Panel". Let it open at another window.
  2. Now, go to "DashboardToPDF" and click on NEW button.
  3. Enter a Title and a Description.
  4. Save it.
  5. It´s time to create the panels to mount the pdf dashboard.
  6. Inside the "DashboardToPDF" you just crerated, at  "Panel2PDF" related list, click on "New Panel2PDF"
  7. Let the field "*DashboardToPDF" as it is
  8. Insert a Report Name for this panel and a description.
  9. go to your regular dashboard panel "Monthly Panel" and copy the URL from the panel image --> Right Click on the image and select "copy image URL".
  10. repeat steps 6 to 9 for each panel you need to insert in PDF panel.
  11. At last, go to "DashboardToPDF" you created and select the panels you want to show and click on "CREATE PDF" at "Panel2PDF" related list

If needed, you can modify the "DASH" visual force page to meet your presentation needs.

 

Hope it helps. Let me know if there are any additonal issues.


 

 

brunol11brunol11

Hi!

 

After installed, you´ll have 2 new menu options: Panel2PDF and DashboardToPDF. and a VisualForce Page named DASH.

   

  1. First, you need to create you regular dashboard panel.- for example "Monthly Panel". Let it open at another window.
  2. Now, go to "DashboardToPDF" and click on NEW button.
  3. Enter a Title and a Description.
  4. Save it.
  5. It´s time to create the panels to mount the pdf dashboard.
  6. Inside the "DashboardToPDF" you just crerated, at  "Panel2PDF" related list, click on "New Panel2PDF"
  7. Let the field "*DashboardToPDF" as it is
  8. Insert a Report Name for this panel and a description.
  9. go to your regular dashboard panel "Monthly Panel" and copy the URL from the panel image --> Right Click on the image and select "copy image URL". and save it
  10. repeat steps 6 to 9 for each panel you need to insert in PDF panel.
  11. At last, go to "DashboardToPDF" you created and select the panels you want to show and click on "CREATE PDF" at "Panel2PDF" related list

If needed, you can modify the "DASH" visual force page to meet your presentation needs.

 

Hope it helps. Let me know if there are any additonal issues.

e6consulte6consult

I've created this but can't get the image to display if I've created a dashboard component which drills down to a 'filtered source report'.  Would this be correct?

brentdowney.ax1325brentdowney.ax1325

Hi brunol11,

 

I installed your application which seems to work well with one exception: the images are not fully supported it seems. The PDF output is missing information (either component colors or related data). For example, I have a gauge component on this particular dashboard, and when it is generated as a PDF, I only have the outline of the gauge. No colors, breaking points, or figures are displayed. Just the outline of the component. Similar things are happening with other components as well. Any suggestions?

 

 

Gunn4rGunn4r

This app is pretty much exactly what I need... but it doesnt seem to work. I tried just creating a visual force page with some of the dashboard images and they render fine until you try to render the page as PDF then they display as broken images.

 

The app itself won't even display the broken images because it looks like the image URLs are too long for the url box in the app.

Jennifer Dos Reis ICOJennifer Dos Reis ICO
Same issue here, I created a visualforce page with the tag <apex:image ..> and the URL of the dashboard. It works if it is rendered as html but when I try to render it as pdf it display as broken image. What can I do ? 
Federica_TPFederica_TP
Gunn4r and Jennifer Dos Reis ICO, the problem is in the Panel_URL__c  field, the link of the inserted image is truncated. Change the field type from URL to Long Text Area.
Abdurrahman ÖzcanAbdurrahman Özcan
Hello everyone,

my company has the same requirement. We want to hand out dashboards to our management as PDFs. I found this post and did, what @Federica_TP suggested. Sadly, my visualforce page only displays "Company Report" at the top and is otherwise empty. It seems like the code from when this was created is not working anymore? Does this have to do with the visualforce page calling the items? I would appreciate it very much if someone looked into this. Thanks so much in advance.

Best regards,
Abdur
SisoSiso
can it be used in email? my requirement is generate PDF and send email as attachment. like subscribe.