Creating PDF documents and exporting download links from the Tableau server
Asked Answered
D

4

6

Is it possible to create PDF documents (e.g. on a nightly schedule) with Tableau and have those documents exposed by a URL by the Tableau server?

This sort of approach is common in the Jasper Reports and BIRT world, so I was wondering if the same approach is possible with Tableau?

I couldn't see any documentation on the Tableau site for creating PDFs, other than print to PDF

Demonize answered 23/4, 2014 at 16:37 Comment(0)
H
5

With Tableau Server, you can access your published workbook in a pdf format with this URL: http://nameofyourtableauserver/views/NameOfYourWorkbook/NameOfYourView.pdf

Simply, the url is the url of your view + you add ".pdf".

The pdf file will be generated dynamically when accessing the URL.

Another option is to program your own script with tabcmd. You can have more info on tabcmd here: http://kb.tableausoftware.com/articles/knowledgebase/using-tabcmd

Hunsaker answered 24/4, 2014 at 13:41 Comment(3)
Thank you. Do you know if it is possible to create images (e.g. png or jpeg) of charts using the same approach? Also, is it possible to pass parameters to the workbook to provide different data filters?Demonize
I believe that Ryan has answered this.Hunsaker
can i filter view appending filter name=value to URL like below ?nameofyourtableauserver/views/NameOfYourWorkbook/…Flue
A
5

The same technique also works for PNG. You can control filters using ?field_name=value. You can even select multiple values like this ?field_name=value1,value2.

Parameters can be set the same way.

Personally I've had the best luck with discrete dimensions instead of continuous ones.

Azerbaijan answered 24/4, 2014 at 15:56 Comment(0)
L
2

I use the Windows Task Scheduler with batch files and Tabcmd.

Programs needed:

  • Tabcmd
  • Windows TaskScheduler (All Programs- Accessories - system tools)

http://onlinehelp.tableausoftware.com/v8.1/server/en-us/tabcmd_overview.htm (tabcmd, how it works?)

Batchfile (create a text file and then save with file extension .bat):

  • 1- Locate tabcmd and login
  • 2- use function tabcmd get "http:\..." and -f "C:...pdf" to save to file.
  • 3- concatenate the filters you want to use to the end of your URL as shown in other answers(all filters on the view must be included(filled out))
  • 4- Save Batch file

Windows Task Scheduler:

  • 1- create a task that will execute the batch file
  • 2- TEST
Lingua answered 29/8, 2014 at 14:44 Comment(0)
D
2

You can do this by typing

http://server/views/WorkbookName/SheetName.pdf?:format=pdf

Another option will be using javascript api like below..

function exportPDF() {
  viz.showExportPDFDialog();
}   
Duster answered 21/11, 2015 at 9:57 Comment(2)
where the pdf is saved, can i get the location. Or can i edit the path if possible function exportPDF() { viz.showExportPDFDialog(); }Apollyon
You will get the save as dialog in which you can save the file in appropriate folder you need.Duster

© 2022 - 2024 — McMap. All rights reserved.