Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating PDF documents and exporting download links from the Tableau server

Tags:

tableau-api

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

like image 792
Chris Snow Avatar asked Apr 23 '14 16:04

Chris Snow


People also ask

Can you export to PDF from Tableau?

Print to PDF. Note: If you're using Tableau Online or Tableau Server, instead see Download Views and Workbooks and Link to a PNG, PDF, or CSV of a View. In Tableau Desktop, you can save views as PDF files rather than printing them as hard copies. You do not need to have Adobe Acrobat installed on your computer.

How do you create a Tableau PDF?

To publish to PDF: Select File > Print to PDF. In the Print to PDF dialog box, select the print range: Entire Workbook - publishes all the sheets in the workbook. Active Sheet - publishes only the sheet currently displayed in the workbook.

How do I export a Tableau link?

Export data in the view to Microsoft Access or . In Tableau Desktop, select Worksheet > Export > Data. Select a location and type a name for your Access database or . csv file. Click Save.

Can Tableau produce PDF reports?

With the new PDF attachment to subscription, users can easily create a report bursting workflow in Tableau by combining PDF attachment in subscriptions and User Filters in workbooks.


4 Answers

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

like image 53
YABADABADOU Avatar answered Oct 09 '22 06:10

YABADABADOU


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.

like image 20
Ryan Avatar answered Oct 09 '22 07:10

Ryan


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
like image 44
user3845582 Avatar answered Oct 09 '22 06:10

user3845582


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();
}   
like image 2
Karthik Venkatraman Avatar answered Oct 09 '22 07:10

Karthik Venkatraman